add flake

This commit is contained in:
Tim Schubert 2022-05-22 15:07:21 +02:00
parent 73ffdfd63a
commit eac632d0cc
Signed by: dadada
GPG key ID: EEB8D1CE62C4DFEA
7 changed files with 95 additions and 0 deletions

29
flake.nix Normal file
View file

@ -0,0 +1,29 @@
{
description = "Flake utils demo";
inputs.flake-utils.url = "github:numtide/flake-utils";
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let pkgs = nixpkgs.legacyPackages.${system}; in
rec {
packages = flake-utils.lib.flattenTree {
hello = pkgs.callPackage ./nix { pkgs = pkgs; };
gitAndTools = pkgs.gitAndTools;
};
defaultPackage = packages.pad-archiver;
apps.pad-archiver = flake-utils.lib.mkApp { drv = packages.pad-archiver; };
defaultApp = apps.pad-archiver;
devShell = pkgs.mkShell {
buildInputs = with pkgs; [
go
gopls
gotools
go-tools
go-langserver
gopls
];
};
}
);
}