From a9982db2fb62e4dd1b0e3a601688f7dff057f030 Mon Sep 17 00:00:00 2001 From: Christine Dodrill Date: Sat, 1 Feb 2020 17:27:19 +0000 Subject: [PATCH] fix?? --- default.nix | 12 ++++++++- pkgs/x/default.nix | 61 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 72 insertions(+), 1 deletion(-) create mode 100644 pkgs/x/default.nix diff --git a/default.nix b/default.nix index 1fc8cec..566d9b1 100644 --- a/default.nix +++ b/default.nix @@ -5,5 +5,15 @@ let callPackage = pkgs.lib.callPackageWith (pkgs // self); - self = { MoonPlus = callPackage ./pkgs/moonplus { }; }; + x = callPackage ./pkgs/x { }; + + self = { + MoonPlus = callPackage ./pkgs/moonplus { }; + appsluggr = x.appsluggr; + johaus = x.johaus; + license = x.license; + mainsanow = x.mainsanow; + prefix = x.prefix; + quickserv = x.quickserv; + }; in self diff --git a/pkgs/x/default.nix b/pkgs/x/default.nix new file mode 100644 index 0000000..5fd9bec --- /dev/null +++ b/pkgs/x/default.nix @@ -0,0 +1,61 @@ +{ pkgs ? import { } }: +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="; + CGO_ENABLED = "0"; + + # TODO: remove references to go in the non-default output + allowGoReference = true; + + subPackages = [ + "cmd/appsluggr" + "cmd/johaus" + "cmd/license" + "cmd/mainsanow" + "cmd/prefix" + "cmd/quickserv" + ]; + + outputs = [ + "out" # keep the default output but don't use it + "appsluggr" + "johaus" + "license" + "mainsanow" + "prefix" + "quickserv" + ]; + + 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 + install -D $dir/quickserv $quickserv/bin/quickserv + # let nix know that everything was fine + touch $out + ''; + }; + +in { + appsluggr = out.appsluggr; + johaus = out.johaus; + license = out.license; + mainsanow = out.mainsanow; + prefix = out.prefix; + quickserv = out.quickserv; +}