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 =
|
2023-09-26 07:10:04 +00:00
|
|
|
"github:nixos/nixpkgs/f758d66c9cc3011f5327f8583908a7803cc019b1";
|
2023-02-08 12:11:43 +00:00
|
|
|
inputs.gomod2nix.url =
|
2023-09-26 07:10:04 +00:00
|
|
|
"github:tweag/gomod2nix/f95720e89af6165c8c0aa77f180461fe786f3c21";
|
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 = [
|
2023-09-26 07:10:04 +00:00
|
|
|
(import "${gomod2nix}/overlay.nix")
|
2023-02-08 12:11:43 +00:00
|
|
|
];
|
|
|
|
};
|
|
|
|
src = ./.;
|
2023-09-26 07:32:28 +00:00
|
|
|
guichet = pkgs.buildGoApplication {
|
2023-02-08 12:11:43 +00:00
|
|
|
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";
|
|
|
|
homepage = "https://git.deuxfleurs.fr/Deuxfleurs/guichet";
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
2022-12-01 22:05:59 +00:00
|
|
|
};
|
2024-06-24 05:53:06 +00:00
|
|
|
|
|
|
|
|
2023-09-26 07:32:28 +00:00
|
|
|
container = pkgs.dockerTools.buildImage {
|
|
|
|
name = "dxflrs/guichet";
|
2024-06-24 05:53:06 +00:00
|
|
|
copyToRoot = pkgs.buildEnv {
|
|
|
|
name = "guichet-env";
|
|
|
|
paths = [ guichet pkgs.cacert ];
|
|
|
|
};
|
2023-09-26 07:32:28 +00:00
|
|
|
config = {
|
2024-06-24 05:53:06 +00:00
|
|
|
Entrypoint = "/bin/guichet";
|
2023-09-26 07:32:28 +00:00
|
|
|
};
|
|
|
|
};
|
2023-02-08 12:11:43 +00:00
|
|
|
in {
|
2023-09-26 07:32:28 +00:00
|
|
|
packages.x86_64-linux.guichet = guichet;
|
|
|
|
packages.x86_64-linux.container = container;
|
|
|
|
packages.x86_64-linux.default = guichet;
|
2023-04-19 13:07:09 +00:00
|
|
|
|
2023-09-26 07:10:04 +00:00
|
|
|
devShell.x86_64-linux = pkgs.mkShell { nativeBuildInputs = [ pkgs.go pkgs.gomod2nix ]; };
|
2022-12-01 22:05:59 +00:00
|
|
|
};
|
|
|
|
}
|