Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new GCS package #317

Merged
merged 1 commit into from
Mar 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions home-config/config/personal/default.nix
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
{pkgs, ...}: {
{
flake-inputs,
pkgs,
...
}: {
imports = [
./ssh-servers.nix
];

home.packages = with pkgs; [prismlauncher];
home.packages = with pkgs; [
prismlauncher
flake-inputs.self.packages.${pkgs.system}.gcs
];
programs.firefox.enableThirdPartyRepositories = true;

programs.git = {
Expand Down
20 changes: 20 additions & 0 deletions pkgs/_sources/generated.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
11 changes: 11 additions & 0 deletions pkgs/_sources/generated.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
65 changes: 65 additions & 0 deletions pkgs/applications/gcs.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{
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
'';
};

RELEASE = sources.gcs.version;
DIST = 1;

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

xorg.libX11
xorg.libXcursor
xorg.libXrandr
xorg.libXinerama
xorg.libXi
xorg.libXxf86vm
];

postInstall = let
# TODO(tlater): Add mimetypes
desktop = ''
[Desktop Entry]
Name=GCS
Comment=GCS (GURPS Character Sheet) is a stand-alone, interactive, character sheet editor that allows you to build characters for the GURPS 4th Edition roleplaying game system.
Exec=gcs
Icon=gcs
Terminal=false
Type=Application
Catgories=Game;Utility;RolePlaying
'';
in ''
mkdir -p $out/share/{applications,icons/hicolor/1024x1024/apps}
echo -n '${desktop}' > $out/share/applications/com.trollworks.gcs.desktop
cp packaging/internal/embedded/app-1024.png $out/share/icons/hicolor/1024x1024/apps/gcs.png

rm $out/bin/{gen,packaging,scr}
'';

vendorHash = "sha256-7uIS/Q+xwUYcdaqzXffZUUFWJ/WOGpYdDnNRHQ4UIaU=";
meta.mainProgram = "${sources.gcs.pname}";
}
1 change: 1 addition & 0 deletions pkgs/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 {};
Expand Down
4 changes: 4 additions & 0 deletions pkgs/nvfetcher.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Loading