about summary refs log tree commit diff
path: root/lib/packages.nix
blob: 7f9dfcbf35dfc54aa99069b8920e84e0fd2976cc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{ inputs, system, ... }:
rec {
  useNixpkgs = nixpkgs: import nixpkgs { inherit system; };

  fromMaster = useNixpkgs inputs.nixpkgs-master;
  fromStable = useNixpkgs inputs.nixpkgs-stable;
  fromUnstable = useNixpkgs (inputs.nixpkgs-unstable or inputs.nixpkgs);
  fromRev =
    rev: hash:
    useNixpkgs (
      inputs.nixpkgs.legacyPackages.${system}.fetchFromGitHub {
        owner = "NixOS";
        repo = "nixpkgs";
        inherit rev hash;
      }
    );
  fromPR = pr: fromRev "refs/pull/${toString pr}/head";
}

Consider giving Nix/NixOS a try! <3