Wrap arion binary
PATH+=docker-compose, unset PYTHONPATH
This commit is contained in:
parent
1fe10c076d
commit
77c492fa86
2 changed files with 21 additions and 1 deletions
|
@ -1,6 +1,7 @@
|
||||||
self: super:
|
self: super:
|
||||||
let
|
let
|
||||||
inherit (self.arion-project) haskellPkgs;
|
inherit (self.arion-project) haskellPkgs;
|
||||||
|
inherit (super) lib;
|
||||||
|
|
||||||
srcDir = ../src; # TODO gitignoreSource + whitelist nix and arion-image
|
srcDir = ../src; # TODO gitignoreSource + whitelist nix and arion-image
|
||||||
eval = import (srcDir + "/nix/eval-composition.nix");
|
eval = import (srcDir + "/nix/eval-composition.nix");
|
||||||
|
@ -13,10 +14,30 @@ in
|
||||||
|
|
||||||
arion-v0 = super.callPackage ../arion.nix {};
|
arion-v0 = super.callPackage ../arion.nix {};
|
||||||
arion = hlib.justStaticExecutables (hlib.overrideCabal haskellPkgs.arion-compose (o: {
|
arion = hlib.justStaticExecutables (hlib.overrideCabal haskellPkgs.arion-compose (o: {
|
||||||
|
buildTools = o.buildTools ++ [super.makeWrapper];
|
||||||
passthru = o.passthru // {
|
passthru = o.passthru // {
|
||||||
inherit eval build;
|
inherit eval build;
|
||||||
};
|
};
|
||||||
pname = "arion"; # Cover up the needlessly long Haskell package name
|
pname = "arion"; # Cover up the needlessly long Haskell package name
|
||||||
|
|
||||||
|
# PYTHONPATH
|
||||||
|
#
|
||||||
|
# We close off the python module search path!
|
||||||
|
#
|
||||||
|
# Accepting directories from the environment into the search path
|
||||||
|
# tends to break things. Docker Compose does not have a plugin
|
||||||
|
# system as far as I can tell, so I don't expect this to break a
|
||||||
|
# feature, but rather to make the program more robustly self-
|
||||||
|
# contained.
|
||||||
|
|
||||||
|
postInstall = ''${o.postInstall or ""}
|
||||||
|
mkdir -p $out/libexec
|
||||||
|
mv $out/bin/arion $out/libexec
|
||||||
|
makeWrapper $out/libexec/arion $out/bin/arion \
|
||||||
|
--unset PYTHONPATH \
|
||||||
|
--prefix PATH : ${lib.makeBinPath [ self.docker-compose ]} \
|
||||||
|
;
|
||||||
|
'';
|
||||||
}));
|
}));
|
||||||
tests = super.callPackage ../tests {};
|
tests = super.callPackage ../tests {};
|
||||||
doc = super.callPackage ../doc {};
|
doc = super.callPackage ../doc {};
|
||||||
|
|
|
@ -12,7 +12,6 @@ in
|
||||||
machine = { pkgs, lib, ... }: {
|
machine = { pkgs, lib, ... }: {
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
pkgs.arion
|
pkgs.arion
|
||||||
pkgs.docker-compose
|
|
||||||
];
|
];
|
||||||
virtualisation.docker.enable = true;
|
virtualisation.docker.enable = true;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue