forked from direnv/direnv
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefault.nix
37 lines (31 loc) · 820 Bytes
/
default.nix
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
35
36
37
{ pkgs ? import ./nix { } }:
let
inherit (pkgs)
bash
buildGoModule
lib
stdenv
;
in
buildGoModule rec {
name = "direnv-${version}";
version = lib.fileContents ./version.txt;
subPackages = [ "." ];
vendorSha256 = "sha256-eQaQ77pOYC8q+IA26ArEhHQ0DCU093TbzaYhdV3UydE=";
src = builtins.fetchGit ./.;
# FIXME: find out why there is a Go reference lingering
allowGoReference = true;
# we have no bash at the moment for windows
makeFlags = lib.optional (!stdenv.hostPlatform.isWindows) [
"BASH_PATH=${bash}/bin/bash"
];
installPhase = ''
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 ];
};
}