Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

direnv: switch to buildGoModule #87932

Merged
merged 1 commit into from May 16, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 4 additions & 8 deletions pkgs/tools/misc/direnv/default.nix
@@ -1,9 +1,10 @@
{ stdenv, fetchFromGitHub, buildGoPackage, bash }:
{ stdenv, fetchFromGitHub, buildGoModule, bash }:

buildGoPackage rec {
buildGoModule rec {
pname = "direnv";
version = "2.21.3";
goPackagePath = "github.com/direnv/direnv";

vendorSha256 = null;

src = fetchFromGitHub {
owner = "direnv";
Expand All @@ -12,17 +13,12 @@ buildGoPackage rec {
sha256 = "1adi6ld9g4zgz0f6q0kkzrywclqrmikyp7yh22zm9lfdvd5hs8wp";
};

postConfigure = ''
cd $NIX_BUILD_TOP/go/src/$goPackagePath
'';

# we have no bash at the moment for windows
makeFlags = stdenv.lib.optional (!stdenv.hostPlatform.isWindows) [
"BASH_PATH=${bash}/bin/bash"
];

installPhase = ''
mkdir -p $out
make install DESTDIR=$out
mkdir -p $out/share/fish/vendor_conf.d
echo "eval ($out/bin/direnv hook fish)" > $out/share/fish/vendor_conf.d/direnv.fish
Expand Down