From 3b1563dd2ef3e62630a503be566ea1a72448d7ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tristan=20Dani=C3=ABl=20Maat?= Date: Wed, 13 Mar 2024 01:11:21 +0100 Subject: [PATCH] gcs: Write working package --- pkgs/_sources/generated.json | 20 +++++++++++++++++ pkgs/_sources/generated.nix | 11 +++++++++ pkgs/applications/gcs.nix | 43 ++++++++++++++++++++++++++++++++++++ pkgs/default.nix | 1 + pkgs/nvfetcher.toml | 4 ++++ 5 files changed, 79 insertions(+) create mode 100644 pkgs/applications/gcs.nix diff --git a/pkgs/_sources/generated.json b/pkgs/_sources/generated.json index 95ba1a5c..5bcb7725 100644 --- a/pkgs/_sources/generated.json +++ b/pkgs/_sources/generated.json @@ -94,6 +94,26 @@ }, "version": "v1.3.0" }, + "gcs": { + "cargoLocks": null, + "date": null, + "extract": null, + "name": "gcs", + "passthru": null, + "pinned": false, + "src": { + "deepClone": false, + "fetchSubmodules": false, + "leaveDotGit": false, + "name": null, + "owner": "richardwilkes", + "repo": "gcs", + "rev": "v5.20.4", + "sha256": "sha256-aoU2wRz2XB6+3e6am/dLjRbcDmWTjtDtTBwc6c4n3DE=", + "type": "github" + }, + "version": "v5.20.4" + }, "ohmyzsh": { "cargoLocks": null, "date": "2024-03-21", diff --git a/pkgs/_sources/generated.nix b/pkgs/_sources/generated.nix index 0731ef62..ea398ff2 100644 --- a/pkgs/_sources/generated.nix +++ b/pkgs/_sources/generated.nix @@ -54,6 +54,17 @@ sha256 = "sha256-GU6HKha7Y01HJX6pyYHORUkFKgl9mWtDd65d+3pYxjI="; }; }; + gcs = { + pname = "gcs"; + version = "v5.20.4"; + src = fetchFromGitHub { + owner = "richardwilkes"; + repo = "gcs"; + rev = "v5.20.4"; + fetchSubmodules = false; + sha256 = "sha256-aoU2wRz2XB6+3e6am/dLjRbcDmWTjtDtTBwc6c4n3DE="; + }; + }; ohmyzsh = { pname = "ohmyzsh"; version = "d157fc60c93fa59e757921b503e9594bd23b422c"; diff --git a/pkgs/applications/gcs.nix b/pkgs/applications/gcs.nix new file mode 100644 index 00000000..8b9353aa --- /dev/null +++ b/pkgs/applications/gcs.nix @@ -0,0 +1,43 @@ +{ + pkgs, + sources, + buildGoModule, +}: +buildGoModule { + inherit (sources.gcs) pname version src; + + overrideModAttrs = _: { + postBuild = '' + sed 's/lmupdf_linux_amd64/lmupdf/' -i ./vendor/github.com/richardwilkes/pdf/pdf.go + ''; + }; + + ldflags = [ + "-X""github.com/richardwilkes/toolbox/cmdline.AppVersion=${sources.gcs.version}" + "-s" + "-w" + ]; + + nativeBuildInputs = with pkgs; [ + pkg-config + ]; + + buildInputs = with pkgs; [ + libGL + fontconfig + freetype + mupdf + # (mupdf.override {enableCxx = true;}) + + xorg.libX11 + xorg.libXcursor + xorg.libXrandr + xorg.libXinerama + xorg.libXi + xorg.libXxf86vm + ]; + + vendorHash = "sha256-7uIS/Q+xwUYcdaqzXffZUUFWJ/WOGpYdDnNRHQ4UIaU="; + # vendorHash = pkgs.lib.fakeHash; + meta.mainProgram = "${sources.gcs.pname}"; +} diff --git a/pkgs/default.nix b/pkgs/default.nix index bbb56a7c..1a862774 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -22,6 +22,7 @@ in { drivestrike = callPackage ./applications/drivestrike.nix {}; emacs = callPackage ./applications/emacs {}; gauth = callPackage ./applications/gauth.nix {}; + gcs = callPackage ./applications/gcs.nix {}; stumpwm = callPackage ./applications/stumpwm {}; stumpwm-contrib = callPackage ./applications/stumpwm/stumpwm-contrib.nix {}; nextcloudcmd = callPackage ./applications/nextcloudcmd.nix {}; diff --git a/pkgs/nvfetcher.toml b/pkgs/nvfetcher.toml index c5974a49..4a730026 100644 --- a/pkgs/nvfetcher.toml +++ b/pkgs/nvfetcher.toml @@ -20,6 +20,10 @@ fetch.github = "black7375/Firefox-UI-Fix" src.github_tag = "pcarrier/gauth" fetch.github = "pcarrier/gauth" +[gcs] +src.github = "richardwilkes/gcs" +fetch.github = "richardwilkes/gcs" + [ohmyzsh] src.git = "https://github.com/ohmyzsh/ohmyzsh" src.branch = "master"