-
Notifications
You must be signed in to change notification settings - Fork 12
/
default.nix
33 lines (28 loc) · 913 Bytes
/
default.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# nixpkgs with our overlay packages.
# This file gets referenced when you import <fc>.
# Set up environment: eval $(./dev-setup)
# Build upstream pacakge: nix-build -A hello
# Build own package: nix-build -A fc.userscan
# ===
# <nixpkgs> should usually point to FC patched upstream nixpkgs
{ nixpkgs ? <nixpkgs>
, localSystem ? builtins.intersectAttrs { system = null; platform = null; } args
, system ? localSystem.system
, platform ? localSystem.platform
, crossSystem ? null
, overlays ? []
, config ? {}
} @ args:
with builtins;
let
nixpkgsConfig = import ./nixpkgs-config.nix;
getName = pkg: pkg.pname or (parseDrvName pkg.name);
in
import nixpkgs {
overlays = overlays ++ [ (import ./pkgs/overlay.nix) ];
config = config // {
inherit (nixpkgsConfig) permittedInsecurePackages;
allowUnfreePredicate = pkg:
elem (getName pkg) nixpkgsConfig.allowedUnfreePackageNames;
};
} // args