From cd499f48bef23a4b669f79c8504da4da9b06b770 Mon Sep 17 00:00:00 2001 From: phanirithvij Date: Sat, 13 Dec 2025 11:55:25 +0530 Subject: [PATCH] goupile: init at 3.12.1 Signed-off-by: phanirithvij --- pkgs/by-name/go/goupile/package.nix | 77 +++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 pkgs/by-name/go/goupile/package.nix diff --git a/pkgs/by-name/go/goupile/package.nix b/pkgs/by-name/go/goupile/package.nix new file mode 100644 index 000000000000..a99a5f88539e --- /dev/null +++ b/pkgs/by-name/go/goupile/package.nix @@ -0,0 +1,77 @@ +{ + lib, + fetchFromGitHub, + versionCheckHook, + installShellFiles, + + stdenv, + clangStdenv, + llvmPackages, + nixosTests, + + # https://goupile.org/en/build recommends a Paranoid build + # which is not bit by bit reproducible, whereas others are + profile ? "Paranoid", +}: + +assert lib.assertOneOf "profile" profile [ + "Fast" + "Debug" + "Paranoid" +]; + +let + stdenv' = if (profile == "Paranoid") then clangStdenv else stdenv; +in +stdenv'.mkDerivation (finalAttrs: { + pname = "goupile"; + version = "3.12.1"; + + # https://github.com/Koromix/rygel/tags + src = fetchFromGitHub { + owner = "Koromix"; + repo = "rygel"; + tag = "goupile/${finalAttrs.version}"; + hash = "sha256-Pn/0tjezVKJedAtqj69avxeIK2l3l9FGioYSyEao12E="; + }; + + nativeBuildInputs = [ + installShellFiles + ] + ++ lib.optionals (profile == "Paranoid") [ + llvmPackages.bintools + ]; + + # pipe2() is only exposed with _GNU_SOURCE + NIX_CFLAGS_COMPILE = [ "-D_GNU_SOURCE" ]; + + buildPhase = '' + runHook preBuild + ./bootstrap.sh + echo "goupile = ${finalAttrs.version}" >FelixVersions.ini + ./felix -s -p${profile} goupile + runHook postBuild + ''; + + installPhase = '' + runHook preInstall + installBin bin/${profile}/goupile + runHook postInstall + ''; + + doInstallCheck = true; + versionCheckProgramArg = "--version"; + nativeInstallCheckInputs = [ versionCheckHook ]; + + passthru.tests = { inherit (nixosTests) goupile; }; + + meta = { + changelog = "https://github.com/Koromix/rygel/blob/${finalAttrs.src.rev}/src/goupile/CHANGELOG.md"; + description = "Free design tool for secure forms including Clinical Report Forms (eCRF)"; + homepage = "https://goupile.org/en"; + license = lib.licenses.gpl3Plus; # sdpx headers + platforms = lib.platforms.linux; # https://goupile.org/en/build + mainProgram = "goupile"; + teams = with lib.teams; [ ngi ]; + }; +})