2020-02-01 17:27:19 +00:00
|
|
|
{ pkgs ? import <nixpkgs> { } }:
|
|
|
|
let
|
|
|
|
version = "1.2.3";
|
|
|
|
|
|
|
|
out = pkgs.buildGoModule {
|
|
|
|
pname = "x";
|
|
|
|
version = version;
|
|
|
|
|
|
|
|
src = pkgs.fetchFromGitHub {
|
|
|
|
owner = "Xe";
|
|
|
|
repo = "x";
|
|
|
|
rev = "v${version}";
|
|
|
|
hash = "sha256-iw9WtpuSMl2NeNlcdg2JV618YVoU3UPa/0ED+r5Sj90=";
|
|
|
|
};
|
|
|
|
|
|
|
|
modSha256 = "sha256-mTzZcEoag1/1IAZCSY7MLgNS+lI453GM8SM1aFVLKUU=";
|
2020-02-05 04:07:19 +00:00
|
|
|
CGO_ENABLED="0";
|
2020-02-01 17:27:19 +00:00
|
|
|
|
|
|
|
# TODO: remove references to go in the non-default output
|
2020-02-05 04:08:26 +00:00
|
|
|
allowGoReference = true;
|
2020-02-01 17:27:19 +00:00
|
|
|
|
|
|
|
subPackages = [
|
2020-02-05 04:07:19 +00:00
|
|
|
"cmd/appsluggr"
|
|
|
|
"cmd/johaus"
|
|
|
|
"cmd/license"
|
|
|
|
"cmd/mainsanow"
|
|
|
|
"cmd/prefix"
|
2020-02-08 21:45:11 +00:00
|
|
|
"cmd/quickserv"
|
2020-02-01 17:27:19 +00:00
|
|
|
];
|
2020-02-05 04:07:19 +00:00
|
|
|
|
|
|
|
outputs = [
|
|
|
|
"out" # keep the default output but don't use it
|
|
|
|
"appsluggr"
|
|
|
|
"johaus"
|
|
|
|
"license"
|
|
|
|
"mainsanow"
|
|
|
|
"prefix"
|
2020-02-08 21:45:11 +00:00
|
|
|
"quickserv"
|
2020-02-05 04:07:19 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
dir=$GOPATH/bin
|
|
|
|
install -D $dir/appsluggr $appsluggr/bin/appsluggr
|
|
|
|
install -D $dir/johaus $johaus/bin/johaus
|
|
|
|
install -D $dir/license $license/bin/license
|
|
|
|
install -D $dir/mainsanow $mainsanow/bin/mainsanow
|
|
|
|
install -D $dir/prefix $prefix/bin/prefix
|
2020-02-08 21:45:11 +00:00
|
|
|
install -D $dir/quickserv $quickserv/bin/prefix
|
2020-02-05 04:07:19 +00:00
|
|
|
# let nix know that everything was fine
|
|
|
|
touch $out
|
|
|
|
'';
|
2020-02-01 17:27:19 +00:00
|
|
|
};
|
|
|
|
|
2020-02-05 04:07:19 +00:00
|
|
|
in
|
|
|
|
{
|
|
|
|
appsluggr = out.appsluggr;
|
|
|
|
johaus = out.johaus;
|
|
|
|
license = out.license;
|
|
|
|
mainsanow = out.mainsanow;
|
|
|
|
prefix = out.prefix;
|
|
|
|
}
|