1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
{ buildGoApplication, lib, stdenv, bash }:
buildGoApplication {
pname = "direnv";
version = lib.fileContents ./version.txt;
subPackages = [ "." ];
src = ./.;
pwd = ./.;
modules = ./gomod2nix.toml;
# we have no bash at the moment for windows
BASH_PATH =
lib.optionalString (!stdenv.hostPlatform.isWindows)
"${bash}/bin/bash";
# replace the build phase to use the GNUMakefile instead
buildPhase = ''
ls -la ./vendor
make BASH_PATH=$BASH_PATH
'';
installPhase = ''
echo $GOCACHE
make install PREFIX=$out
'';
meta = {
description = "A shell extension that manages your environment";
homepage = "https://direnv.net";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.zimbatm ];
mainProgram = "direnv";
};
}
|