From 63a8871eaacd68420283acfd10ac4b1c9119ff6d Mon Sep 17 00:00:00 2001 From: ulic-youthlic Date: Mon, 3 Feb 2025 14:07:16 +0800 Subject: [PATCH] add juicity pkg, and modify overlays. --- home/david/modules/default.nix | 1 + nixos/configurations/Tytonidae/default.nix | 2 ++ overlays/modifications/default.nix | 1 + overlays/modifications/juicity.nix | 9 +++++++ pkgs/default.nix | 1 + pkgs/juicity.nix | 30 ++++++++++++++++++++++ 6 files changed, 44 insertions(+) create mode 100644 overlays/modifications/juicity.nix create mode 100644 pkgs/juicity.nix diff --git a/home/david/modules/default.nix b/home/david/modules/default.nix index 882ebe7..54feb98 100644 --- a/home/david/modules/default.nix +++ b/home/david/modules/default.nix @@ -7,6 +7,7 @@ config = { home.packages = with pkgs; [ spacer + devenv ]; }; } diff --git a/nixos/configurations/Tytonidae/default.nix b/nixos/configurations/Tytonidae/default.nix index ac6f045..ef6a3c4 100644 --- a/nixos/configurations/Tytonidae/default.nix +++ b/nixos/configurations/Tytonidae/default.nix @@ -84,6 +84,8 @@ nvtopPackages.full spotify localsend + + juicity ]; environment.variables.EDITOR = "hx"; diff --git a/overlays/modifications/default.nix b/overlays/modifications/default.nix index 5a51b49..a9fc6b5 100644 --- a/overlays/modifications/default.nix +++ b/overlays/modifications/default.nix @@ -7,6 +7,7 @@ let ./spotify.nix ./niri.nix ./ghostty.nix + ./juicity.nix ]; overlay-list = map (file: import file args) overlay-files; in diff --git a/overlays/modifications/juicity.nix b/overlays/modifications/juicity.nix new file mode 100644 index 0000000..c1bbc69 --- /dev/null +++ b/overlays/modifications/juicity.nix @@ -0,0 +1,9 @@ +{ outputs, ... }: +final: prev: +let + inherit (final) stdenv; + inherit (stdenv.hostPlatform) system; +in +{ + juicity = outputs.packages."${system}".juicity; +} diff --git a/pkgs/default.nix b/pkgs/default.nix index aa935cf..48ba5af 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -6,6 +6,7 @@ { pinentry-selector = pkgs.callPackage ./pinentry-selector.nix { }; helix = pkgs.callPackage ./helix.nix { inherit inputs; }; + juicity = pkgs.callPackage ./juicity.nix { }; } // ( let diff --git a/pkgs/juicity.nix b/pkgs/juicity.nix new file mode 100644 index 0000000..7787cae --- /dev/null +++ b/pkgs/juicity.nix @@ -0,0 +1,30 @@ +{ pkgs, ... }: +pkgs.buildGoModule rec { + name = "juicity"; + version = "unstable-20240514.r132.4af4f68"; + + src = pkgs.fetchFromGitHub { + repo = "juicity"; + owner = "juicity"; + rev = "4af4f68b405a6b86560ebb16963d133a7196af5c"; + hash = "sha256-4sej/nb7d58+hSCaD6KIfDsqiGmgECPIbRKR65TbMBM="; + }; + env.CGO_ENABLED = 0; + + subPackages = [ + "cmd/server" + "cmd/client" + ]; + vendorHash = "sha256-uULJKg1nh6jU0uIgDf4GMu8O00zifLvU2wv65dlHLAs="; + postInstallPhase = '' + mv $out/bin/server $out/bin/juicity-server + mv $out/bin/client $out/bin/juicity-client + ''; + + ldflags = [ + "-s" + "-w" + "-X" + "github.com/juicity/juicity/config.Version=${version}" + ]; +}