nixpkgs-update/default.nix
2019-03-31 17:32:33 -07:00

27 lines
729 B
Nix

{ nixpkgs-tarball ? builtins.fetchTarball {
name = "nixpkgs-unstable";
url = "https://releases.nixos.org/nixpkgs/nixpkgs-19.09pre173445.796a8764ab8/nixexprs.tar.xz";
sha256 = "04frhzc74xx2zsq7gbbnnh2d24hnl58i2sd24hdbwx8kyyh386xd";
}, pkgs ? import nixpkgs-tarball {} }:
let
hp = pkgs.haskellPackages.extend (pkgs.haskellPackages.packageSourceOverrides {
nixpkgs-update = ./.;
});
runtimeDeps = with pkgs; [ gitAndTools.hub jq tree gist ];
drv = pkgs.buildEnv {
name = "nixpkgs-update-env";
paths = [ hp.nixpkgs-update ] ++ runtimeDeps;
};
sh = hp.shellFor {
packages = p: [p.nixpkgs-update];
buildInputs = [ hp.ghcid ] ++ runtimeDeps;
};
in
if pkgs.lib.inNixShell then sh else drv