add snippet for nix flake
This commit is contained in:
parent
649e32838d
commit
4f4db8dc62
1 changed files with 33 additions and 0 deletions
|
|
@ -13,3 +13,36 @@ snippet optionalAttrs
|
|||
snippet deps
|
||||
let pkgs = import <nixpkgs> {}; in
|
||||
with pkgs; [ $1 ]
|
||||
|
||||
snippet flake
|
||||
{
|
||||
description = "Flake utils $1";
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
};
|
||||
|
||||
outputs =
|
||||
{
|
||||
self,
|
||||
nixpkgs,
|
||||
flake-utils,
|
||||
}:
|
||||
flake-utils.lib.eachDefaultSystem (
|
||||
system:
|
||||
let
|
||||
pkgs = nixpkgs.legacyPackages.\${system};
|
||||
in
|
||||
{
|
||||
packages = rec {
|
||||
$1 = pkgs.stdenv.mkDerivation {
|
||||
name = "$1";
|
||||
buildInputs = with pkgs; [
|
||||
$2
|
||||
];
|
||||
};
|
||||
default = $1;
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue