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