summaryrefslogtreecommitdiffstats
path: root/pkgs/desktops/pantheon/nixpkgs_github_update/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/desktops/pantheon/nixpkgs_github_update/default.nix')
-rw-r--r--pkgs/desktops/pantheon/nixpkgs_github_update/default.nix53
1 files changed, 53 insertions, 0 deletions
diff --git a/pkgs/desktops/pantheon/nixpkgs_github_update/default.nix b/pkgs/desktops/pantheon/nixpkgs_github_update/default.nix
new file mode 100644
index 000000000000..834291222cf0
--- /dev/null
+++ b/pkgs/desktops/pantheon/nixpkgs_github_update/default.nix
@@ -0,0 +1,53 @@
+{ lib
+, beamPackages
+, makeWrapper
+, common-updater-scripts
+}:
+
+let
+
+ poison_4 = beamPackages.buildMix {
+ name = "poison";
+ version = "4.0.1";
+
+ src = beamPackages.fetchHex {
+ pkg = "poison";
+ version = "4.0.1";
+ sha256 = "098gdz7xzfmnjzgnnv80nl4h3zl8l9czqqd132vlnfabxbz3d25s";
+ };
+ };
+
+
+in
+
+beamPackages.buildMix {
+ name = "nixpkgs-github-update";
+ version = "0.1.0";
+
+ src = lib.cleanSource ./.;
+
+ nativeBuildInputs = [
+ makeWrapper
+ ];
+
+ beamDeps = with beamPackages; [ erlang poison_4 ];
+
+ buildPhase = ''
+ export HEX_OFFLINE=1
+ export HEX_HOME=`pwd`
+ export MIX_ENV=prod
+ export MIX_NO_DEPS=1
+
+ mix escript.build --no-deps-check
+ '';
+
+ installPhase = ''
+ mkdir -p $out/bin
+ cp nixpkgs_github_update $out/bin
+ '';
+
+ postFixup = ''
+ wrapProgram $out/bin/nixpkgs_github_update \
+ --prefix PATH : "${lib.makeBinPath [ common-updater-scripts ]}"
+ '';
+}