Update to latest nixos-unstable

This simplifies the flake a lot.
This commit is contained in:
Simon Bruder 2022-06-09 22:13:17 +02:00
parent 0123aa1288
commit 50cc02d182
Signed by: simon
GPG key ID: 8D3C82F9F309F8EC
2 changed files with 15 additions and 146 deletions

View file

@ -2,11 +2,11 @@
"nodes": { "nodes": {
"flake-utils": { "flake-utils": {
"locked": { "locked": {
"lastModified": 1619345332, "lastModified": 1653893745,
"narHash": "sha256-qHnQkEp1uklKTpx3MvKtY6xzgcqXDsz5nLilbbuL+3A=", "narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "2ebf2558e5bf978c7fb8ea927dfaed8fefab2e28", "rev": "1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -17,11 +17,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1619796933, "lastModified": 1654694478,
"narHash": "sha256-Tw9QyuOL8ROhMKkpYBmj8r8h9ehEn9JKhZ+VyK4OfMI=", "narHash": "sha256-nFAMETXEhIrqnBe28u6vqy4ixSRr0BRrlZLlS0e7eoM=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "c8dff328e51f62760bf646bc345e3aabcfd82046", "rev": "18de53ca965bd0678aaf09e5ce0daae05c58355a",
"type": "github" "type": "github"
}, },
"original": { "original": {

149
flake.nix
View file

@ -7,144 +7,22 @@
outputs = { self, flake-utils, nixpkgs }: flake-utils.lib.eachDefaultSystem (system: outputs = { self, flake-utils, nixpkgs }: flake-utils.lib.eachDefaultSystem (system:
let let
pkgs = nixpkgs.legacyPackages.${system}; pkgs = import nixpkgs { inherit system; };
in in
rec { rec {
packages = nixpkgs.lib.mapAttrs packages = nixpkgs.lib.mapAttrs
(name: value: pkgs.python3Packages.callPackage value { }) (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 nixpkgss 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 = iosevka-web =
{ stdenv, fetchzip }: { stdenv, fetchzip }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "iosevka-web"; pname = "iosevka-web";
version = "3.7.1"; version = "15.5.0";
src = fetchzip { src = fetchzip {
url = "https://github.com/be5invis/Iosevka/releases/download/v${version}/pkg-iosevka-${version}.zip"; url = "https://github.com/be5invis/Iosevka/releases/download/v15.5.0/webfont-iosevka-15.5.0.zip";
sha256 = "0d012aqfnyqlpl4smfa2x2qz2qmbbfxb6jr4awv8gp6r359rc9k1"; sha256 = "sha256-o7JHLs/E6oJGx0WxdHczK65Is7SZ9HdMXef/Am29OoA=";
stripRoot = false; stripRoot = false;
}; };
@ -152,7 +30,8 @@
installPhase = '' installPhase = ''
mkdir -p $out 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 = '' buildPhase = ''
mkdocs build -d $out mkdocs build -d $out
mkdir -p $out/nix-support
echo "doc wiki $out" >> $out/nix-support/hydra-build-products
''; '';
installPhase = '' installPhase = ''
@ -175,9 +52,9 @@
ln -s ${packages.iosevka-web} $out/assets/fonts/iosevka ln -s ${packages.iosevka-web} $out/assets/fonts/iosevka
''; '';
nativeBuildInputs = [ nativeBuildInputs = with pkgs; [
packages.mkdocs mkdocs
packages.mkdocs-material 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 { };
}); });
} }