1
0
Fork 0
mirror of https://github.com/hercules-ci/flake-parts.git synced 2024-12-14 11:47:31 +00:00
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:
bors[bot] 2023-03-25 09:52:21 +00:00 committed by GitHub
commit 3502ee99d6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 25 additions and 0 deletions

View file

@ -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
View 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;
};
};
}