use blueprint for flake setup
This commit is contained in:
parent
30826707cd
commit
0d7461fa92
6 changed files with 34 additions and 69 deletions
21
default.nix
21
default.nix
|
|
@ -1,21 +0,0 @@
|
||||||
{ pkgs ? (
|
|
||||||
let
|
|
||||||
inherit (builtins) fetchTree fromJSON readFile;
|
|
||||||
inherit ((fromJSON (readFile ./flake.lock)).nodes) nixpkgs gomod2nix;
|
|
||||||
in
|
|
||||||
import (fetchTree nixpkgs.locked) {
|
|
||||||
overlays = [
|
|
||||||
(import "${fetchTree gomod2nix.locked}/overlay.nix")
|
|
||||||
];
|
|
||||||
}
|
|
||||||
)
|
|
||||||
, buildGoApplication ? pkgs.buildGoApplication
|
|
||||||
}:
|
|
||||||
|
|
||||||
buildGoApplication {
|
|
||||||
pname = "awl-ntfy";
|
|
||||||
version = "0.1";
|
|
||||||
pwd = ./.;
|
|
||||||
src = ./.;
|
|
||||||
modules = ./gomod2nix.toml;
|
|
||||||
}
|
|
||||||
8
devshell.nix
Normal file
8
devshell.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
{ pkgs }:
|
||||||
|
|
||||||
|
pkgs.mkShell {
|
||||||
|
packages = [
|
||||||
|
pkgs.mkGoEnv { pwd = ./.; }
|
||||||
|
pkgs.gomod2nix
|
||||||
|
];
|
||||||
|
}
|
||||||
28
flake.nix
28
flake.nix
|
|
@ -1,10 +1,11 @@
|
||||||
{
|
{
|
||||||
description = "A basic gomod2nix flake";
|
description = "Send notification for your local awl trash collection to your phone";
|
||||||
|
|
||||||
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
inputs = {
|
||||||
inputs.flake-utils.url = "github:numtide/flake-utils";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
|
flake-utils.url = "github:numtide/flake-utils";
|
||||||
|
|
||||||
inputs.gomod2nix = {
|
gomod2nix = {
|
||||||
url = "github:nix-community/gomod2nix";
|
url = "github:nix-community/gomod2nix";
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.follows = "nixpkgs";
|
nixpkgs.follows = "nixpkgs";
|
||||||
|
|
@ -12,20 +13,11 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, flake-utils, gomod2nix }:
|
blueprint = {
|
||||||
(flake-utils.lib.eachDefaultSystem
|
url = "github:numtide/blueprint";
|
||||||
(system:
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
let
|
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
|
||||||
callPackage = pkgs.callPackage;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
packages.default = callPackage ./. {
|
|
||||||
inherit (gomod2nix.legacyPackages.${system}) buildGoApplication;
|
|
||||||
};
|
};
|
||||||
devShells.default = callPackage ./shell.nix {
|
|
||||||
inherit (gomod2nix.legacyPackages.${system}) mkGoEnv gomod2nix;
|
|
||||||
};
|
};
|
||||||
})
|
|
||||||
);
|
outputs = inputs: inputs.blueprint inputs;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
9
package.nix
Normal file
9
package.nix
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
{ pkgs }:
|
||||||
|
|
||||||
|
pkgs.buildGoApplication {
|
||||||
|
pname = "awl-ntfy";
|
||||||
|
version = "0.1";
|
||||||
|
pwd = ./.;
|
||||||
|
src = ./.;
|
||||||
|
modules = ./gomod2nix.toml;
|
||||||
|
}
|
||||||
1
result
Symbolic link
1
result
Symbolic link
|
|
@ -0,0 +1 @@
|
||||||
|
/nix/store/zd7pa71h9lihln596dzpdg081kcn9g90-awl-ntfy-0.1
|
||||||
24
shell.nix
24
shell.nix
|
|
@ -1,24 +0,0 @@
|
||||||
{ pkgs ? (
|
|
||||||
let
|
|
||||||
inherit (builtins) fetchTree fromJSON readFile;
|
|
||||||
inherit ((fromJSON (readFile ./flake.lock)).nodes) nixpkgs gomod2nix;
|
|
||||||
in
|
|
||||||
import (fetchTree nixpkgs.locked) {
|
|
||||||
overlays = [
|
|
||||||
(import "${fetchTree gomod2nix.locked}/overlay.nix")
|
|
||||||
];
|
|
||||||
}
|
|
||||||
)
|
|
||||||
, mkGoEnv ? pkgs.mkGoEnv
|
|
||||||
, gomod2nix ? pkgs.gomod2nix
|
|
||||||
}:
|
|
||||||
|
|
||||||
let
|
|
||||||
goEnv = mkGoEnv { pwd = ./.; };
|
|
||||||
in
|
|
||||||
pkgs.mkShell {
|
|
||||||
packages = [
|
|
||||||
goEnv
|
|
||||||
gomod2nix
|
|
||||||
];
|
|
||||||
}
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue