-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
35 lines (35 loc) · 1.09 KB
/
flake.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
34
35
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
};
outputs =
{ self, nixpkgs, ... }@inputs:
let
forAllSys = nixpkgs.lib.genAttrs nixpkgs.lib.platforms.all;
in
{
packages = forAllSys (
system:
let
pkgs = import nixpkgs { inherit system; };
# this calls a ./default.nix file using callPackage.
# In that file, you will build your derivation,
# which is what builds your package.
# callPackage is a nice function you should know about.
powerstation = pkgs.callPackage ./default.nix {
inherit inputs;
# you can pass more args here, which can
# be overridden by yourdrv.override later
# callPackage makes everything from
# pkgs already available, however,
# so you wont need to pass much
};
in
{
# output the package as yourflake.packages.${system}.default
# so that the cli commands know where to look for it
default = powerstation;
}
);
};
}