From b22cceea7d4b93e4721f91c73c6ccd8050358a34 Mon Sep 17 00:00:00 2001 From: Troy Neubauer Date: Tue, 1 Apr 2025 06:41:38 -0700 Subject: [PATCH 1/3] try fix --- appdir.nix | 4 ++-- default.nix | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/appdir.nix b/appdir.nix index feef893..b65e157 100644 --- a/appdir.nix +++ b/appdir.nix @@ -1,4 +1,4 @@ -{ stdenv, lib, fetchurl, muslPkgs, perl, pathsFromGraph, fetchFromGitHub, coreutils, bash }: +{ stdenv, lib, fetchurl, muslPkgs, perl, closureInfo, fetchFromGitHub, coreutils, bash }: let AppRun = targets: muslPkgs.stdenv.mkDerivation { @@ -36,7 +36,7 @@ in exit 1 fi - storePaths=$(${perl}/bin/perl ${pathsFromGraph} ./closure-*) + storePaths=$(${perl}/bin/perl ${closureInfo} ./closure-*) mkdir -p $out/${name}.AppDir cd $out/${name}.AppDir diff --git a/default.nix b/default.nix index 478d445..434f296 100644 --- a/default.nix +++ b/default.nix @@ -36,7 +36,7 @@ rec { buildInputs = [ perl ]; exportReferencesGraph = map (x: [("closure-" + baseNameOf x) x]) targets; buildCommand = '' - storePaths=$(perl ${pathsFromGraph} ./closure-*) + storePaths=$(perl ${closureInfo} ./closure-*) # https://reproducible-builds.org/docs/archives tar -cf - \ From 6cb640a51a70c430050ba0c5a21840e75da5c8c6 Mon Sep 17 00:00:00 2001 From: Troy Neubauer Date: Tue, 1 Apr 2025 07:50:10 -0700 Subject: [PATCH 2/3] wip --- appdir.nix | 3 ++- default.nix | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/appdir.nix b/appdir.nix index b65e157..7cf4626 100644 --- a/appdir.nix +++ b/appdir.nix @@ -36,7 +36,8 @@ in exit 1 fi - storePaths=$(${perl}/bin/perl ${closureInfo} ./closure-*) + closure=$(closureInfo { rootPaths = targets; }) + storePaths=$(cat ${closure}/store-paths) mkdir -p $out/${name}.AppDir cd $out/${name}.AppDir diff --git a/default.nix b/default.nix index 434f296..c1e4ebe 100644 --- a/default.nix +++ b/default.nix @@ -36,7 +36,8 @@ rec { buildInputs = [ perl ]; exportReferencesGraph = map (x: [("closure-" + baseNameOf x) x]) targets; buildCommand = '' - storePaths=$(perl ${closureInfo} ./closure-*) + closure=$(closureInfo { rootPaths = targets; }) + storePaths=$(cat ${closure}/store-paths) # https://reproducible-builds.org/docs/archives tar -cf - \ From 84638f4a8cff38f7a023b2a89c5209cde5ed9534 Mon Sep 17 00:00:00 2001 From: Troy Neubauer Date: Tue, 1 Apr 2025 08:04:19 -0700 Subject: [PATCH 3/3] fix --- appdir.nix | 6 ++++-- default.nix | 5 +++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/appdir.nix b/appdir.nix index 7cf4626..3115857 100644 --- a/appdir.nix +++ b/appdir.nix @@ -19,7 +19,10 @@ let in - { target, name, extraTargets ? [ coreutils bash ] }: let targets = ([ target ] ++ extraTargets); + { target, name, extraTargets ? [ coreutils bash ] }: + let + targets = ([ target ] ++ extraTargets); + closure = closureInfo { rootPaths = targets; }; in stdenv.mkDerivation { name = "${name}.AppDir"; exportReferencesGraph = map (x: [("closure-" + baseNameOf x) x]) targets; @@ -36,7 +39,6 @@ in exit 1 fi - closure=$(closureInfo { rootPaths = targets; }) storePaths=$(cat ${closure}/store-paths) mkdir -p $out/${name}.AppDir diff --git a/default.nix b/default.nix index c1e4ebe..f6d7262 100644 --- a/default.nix +++ b/default.nix @@ -31,12 +31,13 @@ rec { }; maketar = { targets }: - stdenv.mkDerivation { + let + closure = closureInfo { rootPaths = targets; }; + in stdenv.mkDerivation { name = "maketar"; buildInputs = [ perl ]; exportReferencesGraph = map (x: [("closure-" + baseNameOf x) x]) targets; buildCommand = '' - closure=$(closureInfo { rootPaths = targets; }) storePaths=$(cat ${closure}/store-paths) # https://reproducible-builds.org/docs/archives