30 lines
939 B
Nix
30 lines
939 B
Nix
{
|
|
nixPkgsVersion ? "3e52e76b70d5508f3cec70b882a29199f4d1ee85",
|
|
currentSystem
|
|
}:
|
|
let
|
|
|
|
getNixPkgs = args: import (builtins.fetchGit {
|
|
name = "nixpkg-serene-${nixPkgsVersion}";
|
|
url = "https://github.com/nixos/nixpkgs/";
|
|
# Commit hash for nixos-unstable as of 2018-09-12
|
|
# `git ls-remote https://github.com/nixos/nixpkgs nixos-unstable`
|
|
ref = "refs/heads/nixos-unstable";
|
|
rev = nixPkgsVersion;
|
|
}) args;
|
|
|
|
nixpkgs = getNixPkgs { system = currentSystem; };
|
|
system = import ./system.nix {
|
|
pkgs = nixpkgs;
|
|
inherit currentSystem;
|
|
};
|
|
staticMuslPkgs = getNixPkgs system;
|
|
llvm = staticMuslPkgs.llvmPackages_16.override { stdenv = staticMuslPkgs.llvmPackages_16.libcxxStdenv; };
|
|
|
|
createPkgSet = _: # It has to be the nixpkgs instance
|
|
getNixPkgs (system // { config.replaceStdenv = _: llvm.libcxxStdenv; });
|
|
|
|
in {
|
|
inherit createPkgSet;
|
|
}
|