nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 77 lines 1.7 kB view raw
1{ 2 lib, 3 buildGoModule, 4 fetchFromGitHub, 5 stdenv, 6 copyDesktopItems, 7 makeDesktopItem, 8 9 libxxf86vm, 10 glfw, 11 gtk3, 12 pkg-config, 13 wrapGAppsHook3, 14}: 15 16buildGoModule (finalAttrs: { 17 pname = "picocrypt"; 18 version = "1.49"; 19 20 src = fetchFromGitHub { 21 owner = "Picocrypt"; 22 repo = "Picocrypt"; 23 tag = finalAttrs.version; 24 hash = "sha256-B10PP/V8xvYbA6rQHWdav/KtQKecNUmwvj9qMYqml8E="; 25 }; 26 27 sourceRoot = "${finalAttrs.src.name}/src"; 28 29 vendorHash = "sha256-0fEy/YuZa7dENfL3y+NN4SLWYwOLmXqHHJEiU37AkX4="; 30 31 ldflags = [ 32 "-s" 33 "-w" 34 ]; 35 36 buildInputs = 37 # Depends on a vendored, patched GLFW. 38 glfw.buildInputs or [ ] 39 ++ glfw.propagatedBuildInputs or [ ] 40 ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ 41 gtk3 42 libxxf86vm 43 ]; 44 45 nativeBuildInputs = [ 46 copyDesktopItems 47 pkg-config 48 wrapGAppsHook3 49 ]; 50 51 env.CGO_ENABLED = 1; 52 53 postInstall = '' 54 mv $out/bin/Picocrypt $out/bin/picocrypt-gui 55 install -Dm644 $src/images/key.svg $out/share/icons/hicolor/scalable/apps/picocrypt.svg 56 ''; 57 58 desktopItems = [ 59 (makeDesktopItem { 60 name = "Picocrypt"; 61 exec = "picocrypt-gui"; 62 icon = "picocrypt"; 63 comment = finalAttrs.meta.description; 64 desktopName = "Picocrypt"; 65 categories = [ "Utility" ]; 66 }) 67 ]; 68 69 meta = { 70 description = "Very small, very simple, yet very secure encryption tool, written in Go"; 71 homepage = "https://github.com/Picocrypt/Picocrypt"; 72 changelog = "https://github.com/Picocrypt/Picocrypt/blob/${finalAttrs.version}/Changelog.md"; 73 license = lib.licenses.gpl3Only; 74 maintainers = with lib.maintainers; [ ryand56 ]; 75 mainProgram = "picocrypt-gui"; 76 }; 77})