From 450419d4315b9f08323861740475640523cf4f5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Wed, 17 Jan 2024 10:45:16 +0200 Subject: [PATCH] move e11sync-static-manifest to e11sync-static --- flake.nix | 8 +++----- pkgs/e11sync-static-manifest.nix | 10 ---------- pkgs/e11sync-static.nix | 7 +++++++ 3 files changed, 10 insertions(+), 15 deletions(-) delete mode 100644 pkgs/e11sync-static-manifest.nix diff --git a/flake.nix b/flake.nix index 8f81472..8950e10 100644 --- a/flake.nix +++ b/flake.nix @@ -53,9 +53,7 @@ inherit geoip2-tarball; }; - e11sync-static = pkgs.callPackage ./pkgs/e11sync-static.nix {}; - - e11sync-static-manifest = pkgs.callPackage ./pkgs/e11sync-static-manifest.nix { + e11sync-static = pkgs.callPackage ./pkgs/e11sync-static.nix { inherit e11sync-static; }; @@ -64,7 +62,8 @@ }; e11sync-backend = pkgs.callPackage ./pkgs/e11sync-backend.nix { - inherit geoip-mmdb e11sync-static-manifest; + inherit geoip-mmdb; + e11sync-static-manifest = e11sync-static.passthru.manifest; }; e11sync-module = import ./modules/e11sync { @@ -74,7 +73,6 @@ packages = { inherit geoip-mmdb; inherit e11sync-static; - inherit e11sync-static-manifest; inherit e11sync-frontend; inherit e11sync-backend; }; diff --git a/pkgs/e11sync-static-manifest.nix b/pkgs/e11sync-static-manifest.nix deleted file mode 100644 index 6e6c16d..0000000 --- a/pkgs/e11sync-static-manifest.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ - runCommand, - e11sync-static, -}: -runCommand "e11sync-static-manifest" { - nativeBuildInputs = [e11sync-static]; -} '' - mkdir -p $out/CACHE - cp ${e11sync-static}/CACHE/manifest.json $out/CACHE/ -'' diff --git a/pkgs/e11sync-static.nix b/pkgs/e11sync-static.nix index 6e4a1de..a0a1710 100644 --- a/pkgs/e11sync-static.nix +++ b/pkgs/e11sync-static.nix @@ -1,5 +1,6 @@ { stdenv, + runCommand, python3Packages, coreutils, zopfli, @@ -7,6 +8,7 @@ findutils, dart-sass, gawk, + e11sync-static, }: stdenv.mkDerivation { name = "e11sync-static"; @@ -35,4 +37,9 @@ stdenv.mkDerivation { ${findutils}/bin/xargs -P''$(${coreutils}/bin/nproc) -I{} $SHELL -c {} ''; installPhase = ''mv static $out''; + + passthru.manifest = runCommand "e11sync-static-manifest" {} '' + mkdir -p $out/CACHE + cp ${e11sync-static}/CACHE/manifest.json $out/CACHE/ + ''; }