Update to latest nixos-unstable
This simplifies the flake a lot.
This commit is contained in:
parent
0123aa1288
commit
50cc02d182
12
flake.lock
12
flake.lock
|
@ -2,11 +2,11 @@
|
|||
"nodes": {
|
||||
"flake-utils": {
|
||||
"locked": {
|
||||
"lastModified": 1619345332,
|
||||
"narHash": "sha256-qHnQkEp1uklKTpx3MvKtY6xzgcqXDsz5nLilbbuL+3A=",
|
||||
"lastModified": 1653893745,
|
||||
"narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "2ebf2558e5bf978c7fb8ea927dfaed8fefab2e28",
|
||||
"rev": "1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -17,11 +17,11 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1619796933,
|
||||
"narHash": "sha256-Tw9QyuOL8ROhMKkpYBmj8r8h9ehEn9JKhZ+VyK4OfMI=",
|
||||
"lastModified": 1654694478,
|
||||
"narHash": "sha256-nFAMETXEhIrqnBe28u6vqy4ixSRr0BRrlZLlS0e7eoM=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "c8dff328e51f62760bf646bc345e3aabcfd82046",
|
||||
"rev": "18de53ca965bd0678aaf09e5ce0daae05c58355a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
149
flake.nix
149
flake.nix
|
@ -7,144 +7,22 @@
|
|||
|
||||
outputs = { self, flake-utils, nixpkgs }: flake-utils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
in
|
||||
rec {
|
||||
packages = nixpkgs.lib.mapAttrs
|
||||
(name: value: pkgs.python3Packages.callPackage value { })
|
||||
{
|
||||
lunr =
|
||||
{ buildPythonPackage, fetchPypi, future, six, mock, pytest }:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "lunr";
|
||||
version = "0.5.8";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "0vn2j5iyy40sv0f4v8nin5n5xs4a020g6gcbcgfpbxzgk0xhdyy4";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
future
|
||||
six
|
||||
];
|
||||
|
||||
checkInputs = [
|
||||
mock
|
||||
pytest
|
||||
];
|
||||
};
|
||||
|
||||
# FIXME: use nixpkgs’s mkdocs once it is ≥1.1
|
||||
mkdocs =
|
||||
{ buildPythonPackage
|
||||
, fetchPypi
|
||||
, backports_tempfile
|
||||
, click
|
||||
, jinja2
|
||||
, livereload
|
||||
, markdown
|
||||
, nltk
|
||||
, pyyaml
|
||||
, tornado
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "mkdocs";
|
||||
version = "1.1.2";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "0fgv5zawpyyv0vd4j5y8m4h058lh9jkwfcm0xy4pg7dr09a1xdph";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
backports_tempfile
|
||||
click
|
||||
jinja2
|
||||
livereload
|
||||
markdown
|
||||
nltk
|
||||
pyyaml
|
||||
tornado
|
||||
|
||||
packages.lunr
|
||||
];
|
||||
|
||||
doCheck = false; # circular depdendency
|
||||
};
|
||||
|
||||
pymdown-extensions =
|
||||
{ buildPythonPackage, fetchPypi, markdown }:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "pymdown-extensions";
|
||||
version = "8.0.1";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "07p5xks6qf73nbv0qb7jrspkpmxdyr7dpxv3rnkh9p2b5l2h99wv";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
markdown
|
||||
];
|
||||
|
||||
doCheck = false; # they fail?
|
||||
};
|
||||
|
||||
mkdocs-material-extensions =
|
||||
{ buildPythonPackage, fetchPypi }:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "mkdocs-material-extensions";
|
||||
version = "1.0.1";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "13y617sql4hqs376c3dfcb6v7q41km9x7fh52k3f74a2brzzniv9";
|
||||
};
|
||||
|
||||
# circular dependency
|
||||
doCheck = false;
|
||||
postPatch = ''
|
||||
sed -i 's/mkdocs-material>=5.0.0//' requirements/project.txt
|
||||
'';
|
||||
};
|
||||
|
||||
mkdocs-material =
|
||||
{ buildPythonPackage, fetchPypi, markdown, pygments }:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "mkdocs-material";
|
||||
version = "6.1.2";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "0yifc1df94rsaxy72hqnhjkv4c50c30j5kg0yxybkxy07p7kafic";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
markdown
|
||||
pygments
|
||||
|
||||
packages.mkdocs
|
||||
packages.mkdocs-material-extensions
|
||||
packages.pymdown-extensions
|
||||
];
|
||||
};
|
||||
|
||||
iosevka-web =
|
||||
{ stdenv, fetchzip }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "iosevka-web";
|
||||
version = "3.7.1";
|
||||
version = "15.5.0";
|
||||
|
||||
src = fetchzip {
|
||||
url = "https://github.com/be5invis/Iosevka/releases/download/v${version}/pkg-iosevka-${version}.zip";
|
||||
sha256 = "0d012aqfnyqlpl4smfa2x2qz2qmbbfxb6jr4awv8gp6r359rc9k1";
|
||||
url = "https://github.com/be5invis/Iosevka/releases/download/v15.5.0/webfont-iosevka-15.5.0.zip";
|
||||
sha256 = "sha256-o7JHLs/E6oJGx0WxdHczK65Is7SZ9HdMXef/Am29OoA=";
|
||||
stripRoot = false;
|
||||
};
|
||||
|
||||
|
@ -152,7 +30,8 @@
|
|||
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
cp -r woff woff2 ttf *.css $out
|
||||
sed -e "s/url('ttf\/iosevka-.*.ttf') format('truetype'), //" iosevka.css > $out/iosevka.css
|
||||
cp -r woff2 $out
|
||||
'';
|
||||
};
|
||||
|
||||
|
@ -166,8 +45,6 @@
|
|||
|
||||
buildPhase = ''
|
||||
mkdocs build -d $out
|
||||
mkdir -p $out/nix-support
|
||||
echo "doc wiki $out" >> $out/nix-support/hydra-build-products
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
|
@ -175,9 +52,9 @@
|
|||
ln -s ${packages.iosevka-web} $out/assets/fonts/iosevka
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
packages.mkdocs
|
||||
packages.mkdocs-material
|
||||
nativeBuildInputs = with pkgs; [
|
||||
mkdocs
|
||||
python3Packages.mkdocs-material
|
||||
];
|
||||
};
|
||||
};
|
||||
|
@ -192,13 +69,5 @@
|
|||
'');
|
||||
};
|
||||
};
|
||||
|
||||
# My hydra only has x86_64-linux builders
|
||||
hydraJobs =
|
||||
if builtins.elem system [ "x86_64-linux" ]
|
||||
then {
|
||||
build = packages.wiki;
|
||||
}
|
||||
else { };
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue