Skip to content

Commit

Permalink
Simplify substituteInPlace calls
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagokokada committed Oct 24, 2023
1 parent fc1baf7 commit 8e6aff8
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions nix-alien.nix
Original file line number Diff line number Diff line change
Expand Up @@ -31,23 +31,7 @@ python3.pkgs.buildPythonApplication {

preBuild = lib.optionalString (rev != null) ''
echo "__version__ = \"${rev}\"" > nix_alien/_version.py
substituteInPlace nix_alien/fhs_env.template.nix \
--subst-var-by nixpkgsLastModifiedDate ${nixpkgs-src.lastModifiedDate} \
--subst-var-by nixpkgsRev ${nixpkgs-src.rev} \
--subst-var-by nixpkgsHash ${nixpkgs-src.narHash}
substituteInPlace nix_alien/fhs_env_flake.template.nix \
--subst-var-by nixpkgsRev ${nixpkgs-src.rev}
substituteInPlace tests/test_fhs_env.py \
--subst-var-by nixpkgsLastModifiedDate ${nixpkgs-src.lastModifiedDate} \
--subst-var-by nixpkgsRev ${nixpkgs-src.rev} \
--subst-var-by nixpkgsHash ${nixpkgs-src.narHash}
substituteInPlace nix_alien/nix_ld.template.nix \
--subst-var-by nixpkgsLastModifiedDate ${nixpkgs-src.lastModifiedDate} \
--subst-var-by nixpkgsRev ${nixpkgs-src.rev} \
--subst-var-by nixpkgsHash ${nixpkgs-src.narHash}
substituteInPlace nix_alien/nix_ld_flake.template.nix \
--subst-var-by nixpkgsRev ${nixpkgs-src.rev}
substituteInPlace tests/test_nix_ld.py \
substituteInPlace {nix_alien,tests}/*.{py,nix} \
--subst-var-by nixpkgsLastModifiedDate ${nixpkgs-src.lastModifiedDate} \
--subst-var-by nixpkgsRev ${nixpkgs-src.rev} \
--subst-var-by nixpkgsHash ${nixpkgs-src.narHash}
Expand Down

0 comments on commit 8e6aff8

Please sign in to comment.