diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..f25f5fd --- /dev/null +++ b/Dockerfile @@ -0,0 +1,13 @@ +FROM monacoremo/nix:2020-01-31-62bbc2ab +RUN nix-channel --add https://nixos.org/channels/nixpkgs-unstable nixpkgs \ + && nix-channel --update +ENV USER root +RUN nix-env -i gnutar gzip \ + && nix-env -iA cachix -f https://cachix.org/api/v1/install \ + && cachix use xe \ + && nix-env -e cachix \ + && nix-collect-garbage + +WORKDIR /xe/pkgs +COPY . . +RUN nix-build default.nix && nix-collect-garbage diff --git a/default.nix b/default.nix index 2f61cc1..da12163 100644 --- a/default.nix +++ b/default.nix @@ -5,8 +5,14 @@ let callPackage = pkgs.lib.callPackageWith (pkgs // self); + x = callPackage ./pkgs/x { }; + self = { MoonPlus = callPackage ./pkgs/moonplus { }; - x = callPackage ./pkgs/x { }; + appsluggr = x.appsluggr; + johaus = x.johaus; + license = x.license; + mainsanow = x.mainsanow; + prefix = x.prefix; }; in self diff --git a/pkgs/moonplus/default.nix b/pkgs/moonplus/default.nix index 214389c..2ab8aec 100644 --- a/pkgs/moonplus/default.nix +++ b/pkgs/moonplus/default.nix @@ -4,21 +4,21 @@ let repo = fetchFromGitHub { owner = "pigpigyyy"; repo = "MoonPlus"; - rev = "57191ed45bb7bd0ffcd917f00df2e940c900fb3c"; - sha256 = "0scbi3d83g7yr51gnxasz2h924wyhbfq3c4a7c7sb0rrzb7m8ln7"; + rev = "2e50c15bfe67d4709880a0377d37fca191be2f3e"; + sha256 = "0h4kh20qi457mbwi4v7apji4kxqi8razys4aqp4z5v9d7zy0d0zz"; }; defaultAttrs = { builder = ./builder.sh; baseInputs = []; src = repo; - version = "HEAD-57191ed4"; + version = "HEAD-2e50c15"; name = "MoonPlus"; system = builtins.currentSystem; installPhase = '' ls - install -D bin/release/moonc $out/bin/moonc + install -D bin/release/moonp $out/bin/moonp ''; }; diff --git a/pkgs/x/default.nix b/pkgs/x/default.nix index 978c3d4..878e162 100644 --- a/pkgs/x/default.nix +++ b/pkgs/x/default.nix @@ -14,14 +14,45 @@ let }; modSha256 = "sha256-mTzZcEoag1/1IAZCSY7MLgNS+lI453GM8SM1aFVLKUU="; - CGO_ENABLED = "0"; + CGO_ENABLED="0"; # TODO: remove references to go in the non-default output - allowGoReference = true; + allowGoReference = false; subPackages = [ - "./..." + "cmd/appsluggr" + "cmd/johaus" + "cmd/license" + "cmd/mainsanow" + "cmd/prefix" ]; + + outputs = [ + "out" # keep the default output but don't use it + "appsluggr" + "johaus" + "license" + "mainsanow" + "prefix" + ]; + + 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 + # let nix know that everything was fine + touch $out + ''; }; -in out +in +{ + appsluggr = out.appsluggr; + johaus = out.johaus; + license = out.license; + mainsanow = out.mainsanow; + prefix = out.prefix; +}