1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-22 23:10:02 +00:00
nixpkgs/pkgs/desktops/pantheon/nixpkgs_github_update/default.nix

54 lines
926 B
Nix
Raw Normal View History

{ 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 ]}"
'';
}