25 lines
774 B
Nix
25 lines
774 B
Nix
|
{
|
||
|
inputs = {
|
||
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||
|
flake-utils.url = "github:numtide/flake-utils";
|
||
|
};
|
||
|
outputs = { self, nixpkgs, flake-utils }:
|
||
|
flake-utils.lib.eachDefaultSystem (system:
|
||
|
let
|
||
|
# no need to define `system` anymore
|
||
|
name = "simple";
|
||
|
src = ./.;
|
||
|
pkgs = nixpkgs.legacyPackages.${system};
|
||
|
in
|
||
|
{
|
||
|
# `eachDefaultSystem` transforms the input, our output set
|
||
|
# now simply has `packages.default` which gets turned into
|
||
|
# `packages.${system}.default` (for each system)
|
||
|
packages.default = derivation {
|
||
|
inherit system name src;
|
||
|
builder = with pkgs; "${bash}/bin/bash";
|
||
|
args = [ "-c" "echo foo > $out" ];
|
||
|
};
|
||
|
}
|
||
|
);
|
||
|
}
|