mirror of
https://github.com/hercules-ci/flake-parts.git
synced 2024-12-14 11:47:31 +00:00
Merge #129
129: add an unfree template r=roberth a=Mic92 An example on how to apply nixpkgs option when importing. Co-authored-by: Jörg Thalheim <joerg@thalheim.io>
This commit is contained in:
commit
3502ee99d6
2 changed files with 25 additions and 0 deletions
|
@ -20,6 +20,12 @@
|
|||
A minimal flake using flake-parts.
|
||||
'';
|
||||
};
|
||||
unfree = {
|
||||
path = ./template/unfree;
|
||||
description = ''
|
||||
A minimal flake using flake-parts importing nixpkgs with the unfree option.
|
||||
'';
|
||||
};
|
||||
};
|
||||
flakeModules = {
|
||||
easyOverlay = ./extras/easyOverlay.nix;
|
||||
|
|
19
template/unfree/flake.nix
Normal file
19
template/unfree/flake.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
description = "Description for the project";
|
||||
|
||||
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
|
||||
outputs = inputs@{ flake-parts, nixpkgs, ... }:
|
||||
flake-parts.lib.mkFlake { inherit inputs; } {
|
||||
systems = [ "x86_64-linux" "aarch64-darwin" ];
|
||||
perSystem = { pkgs, system, ... }: {
|
||||
# This sets `pkgs` to a nixpkgs with allowUnfree option set.
|
||||
_module.args.pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
|
||||
packages.default = pkgs.hello-unfree;
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue