2022-12-01 22:05:59 +00:00
|
|
|
{
|
|
|
|
description = "A simple LDAP web interface for Bottin";
|
|
|
|
|
2023-02-08 12:11:43 +00:00
|
|
|
inputs.nixpkgs.url =
|
|
|
|
"github:nixos/nixpkgs/0244e143dc943bcf661fdaf581f01eb0f5000fcf";
|
|
|
|
inputs.gomod2nix.url =
|
|
|
|
"github:tweag/gomod2nix/40d32f82fc60d66402eb0972e6e368aeab3faf58";
|
2022-12-01 22:05:59 +00:00
|
|
|
|
|
|
|
outputs = { self, nixpkgs, gomod2nix }:
|
2023-02-08 12:11:43 +00:00
|
|
|
let
|
|
|
|
pkgs = import nixpkgs {
|
|
|
|
system = "x86_64-linux";
|
|
|
|
overlays = [
|
|
|
|
(self: super: {
|
|
|
|
gomod = super.callPackage "${gomod2nix}/builder/" { };
|
|
|
|
})
|
|
|
|
];
|
|
|
|
};
|
|
|
|
src = ./.;
|
|
|
|
bottin = pkgs.gomod.buildGoApplication {
|
|
|
|
pname = "guichet";
|
|
|
|
version = "0.1.0";
|
|
|
|
src = src;
|
|
|
|
modules = ./gomod2nix.toml;
|
2022-12-01 22:05:59 +00:00
|
|
|
|
2023-02-08 12:11:43 +00:00
|
|
|
CGO_ENABLED = 0;
|
2022-12-01 22:05:59 +00:00
|
|
|
|
2023-02-08 12:11:43 +00:00
|
|
|
ldflags = [
|
|
|
|
"-X main.templatePath=${src + "/templates"}"
|
|
|
|
"-X main.staticPath=${src + "/static"}"
|
|
|
|
];
|
2022-12-01 22:05:59 +00:00
|
|
|
|
2023-02-08 12:11:43 +00:00
|
|
|
meta = with pkgs.lib; {
|
|
|
|
description = "A simple LDAP web interface for Bottin";
|
2023-07-17 09:32:41 +00:00
|
|
|
homepage = "https://git.deuxfleurs.fr/Deuxfleurs/guichet";
|
2023-02-08 12:11:43 +00:00
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
2022-12-01 22:05:59 +00:00
|
|
|
};
|
2023-02-08 12:11:43 +00:00
|
|
|
in {
|
|
|
|
packages.x86_64-linux.bottin = bottin;
|
2023-04-19 13:07:09 +00:00
|
|
|
packages.x86_64-linux.default = bottin;
|
|
|
|
|
2023-02-08 12:11:43 +00:00
|
|
|
devShell.x86_64-linux = pkgs.mkShell { nativeBuildInputs = [ pkgs.go ]; };
|
2022-12-01 22:05:59 +00:00
|
|
|
};
|
|
|
|
}
|