commit 36f20ee80e86e08a08c74ffa6a688b1e49473503
parent 2bf3a002106afd8f3d1ab9e3bfff4561e3a88ba4
Author: Leah (ctucx) <git@ctu.cx>
Date: Mon, 10 Jun 2024 18:55:29 +0200
parent 2bf3a002106afd8f3d1ab9e3bfff4561e3a88ba4
Author: Leah (ctucx) <git@ctu.cx>
Date: Mon, 10 Jun 2024 18:55:29 +0200
update to nixpkgs 24.05
3 files changed, 45 insertions(+), 22 deletions(-)
diff --git a/flake.lock b/flake.lock @@ -1,12 +1,15 @@ { "nodes": { "flake-utils": { + "inputs": { + "systems": "systems" + }, "locked": { - "lastModified": 1667395993, - "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", + "lastModified": 1710146030, + "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", "owner": "numtide", "repo": "flake-utils", - "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", + "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", "type": "github" }, "original": { @@ -17,16 +20,16 @@ }, "nixpkgs": { "locked": { - "lastModified": 1670543317, - "narHash": "sha256-4mMR56rtxKr+Gwz399jFr4i76SQZxsLWxxyfQlPXRm0=", + "lastModified": 1717696253, + "narHash": "sha256-1+ua0ggXlYYPLTmMl3YeYYsBXDSCqT+Gw3u6l4gvMhA=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "7a6a010c3a1d00f8470a5ca888f2f927f1860a19", + "rev": "9b5328b7f761a7bbdc0e332ac4cf076a3eedb89b", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-22.11", + "ref": "nixos-24.05", "repo": "nixpkgs", "type": "github" } @@ -36,6 +39,21 @@ "flake-utils": "flake-utils", "nixpkgs": "nixpkgs" } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } } }, "root": "root",
diff --git a/flake.nix b/flake.nix @@ -3,7 +3,7 @@ inputs = { flake-utils.url = "github:numtide/flake-utils"; - nixpkgs.url = "github:NixOS/nixpkgs/nixos-22.11"; + nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05"; }; outputs = { self, nixpkgs, flake-utils }: { @@ -12,7 +12,7 @@ ctucx-gallery = ( let - nimexif = final.nimPackages.buildNimPackage { + nimexif = final.stdenv.mkDerivation { name = "nimexif"; src = final.fetchgit { url = "https://cgit.ctu.cx/nimexif"; @@ -26,17 +26,17 @@ substituteAllInPlace nimexif/libexif_prewrapped.nim cp nimexif/libexif_prewrapped.nim nimexif/libexif.nim; ''; - }; - nimjpg = final.nimPackages.buildNimPackage { - name = "nimjpg"; - src = final.fetchgit { - url = "https://cgit.ctu.cx/nimjpg"; - rev = "cf530668cf92d9d509744b54b93bd4101a5ae6c5"; - sha256 = "03mbbs6wk67llh3ln871jwyvyl2qrv1m5rivlgmg2jlj8462m0sg"; - }; + installPhase = '' + mkdir -p $out + cp -r nimexif $out + ''; + }; - buildInputs = [ nimexif ]; + nimjpg = final.fetchgit { + url = "https://cgit.ctu.cx/nimjpg"; + rev = "cf530668cf92d9d509744b54b93bd4101a5ae6c5"; + sha256 = "03mbbs6wk67llh3ln871jwyvyl2qrv1m5rivlgmg2jlj8462m0sg"; }; moustachu = final.fetchFromGitHub { @@ -46,13 +46,18 @@ sha256 = "16ij1igddmily9g1kbkmhv6kvmnzyhdy10ifidf32frkraypkdm3"; }; - in final.nimPackages.buildNimPackage { + in final.buildNimPackage { name = "ctucx.gallery"; src = self; - buildInputs = [ final.libexif nimexif nimjpg moustachu ]; + nimFlags = [ + "--path:${nimexif}" + "--path:${nimjpg}" + "--path:${moustachu}/src" + ]; + + buildInputs = [ final.libexif ]; - nimBinOnly = true; nimRelease = true; } );
diff --git a/gallery.nimble b/gallery.nimble @@ -10,4 +10,4 @@ bin = @["gallery"] # Dependencies requires "nim >= 1.0.6" requires "moustachu >= 0.14.0" -requires "https://cgit.ctu.cx/nimjpg" +requires "git+https://git.ctu.cx/nimjpg"