mirror of
https://github.com/nix-community/nixpkgs-update.git
synced 2024-11-25 20:13:04 +03:00
27 lines
729 B
Nix
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
|