This commit is contained in:
death916 2025-05-15 03:47:54 -07:00
parent e56e6b8684
commit 1a69f5da78

View file

@ -9,28 +9,18 @@
stdenv.mkDerivation rec {
pname = "tmuxai";
version = "1.0.3"; # Current release
version = "1.0.3";
# For Linux x86_64 (amd64)
srcFilename = if stdenv.isLinux && stdenv.hostPlatform.isx86_64 then
"tmuxai_Linux_amd64.tar.gz"
else if stdenv.isLinux && stdenv.hostPlatform.isAarch64 then
"tmuxai_Linux_arm64.tar.gz"
# Add more platform conditions if needed, e.g., for Darwin
# else if stdenv.isDarwin && stdenv.hostPlatform.isx86_64 then
# "tmuxai_Darwin_amd64.tar.gz"
# else if stdenv.isDarwin && stdenv.hostPlatform.isAarch64 then
# "tmuxai_Darwin_arm64.tar.gz"
else throw "Unsupported platform for tmuxai precompiled binary: ${stdenv.hostPlatform.system}";
srcHash = if stdenv.isLinux && stdenv.hostPlatform.isx86_64 then
"sha256-916b390a283d415f9d303fd705cc162402ed071d616dbe7620ea683b49c28a4e" # From your tmuxsha256.txt for Linux amd64
"sha256-916b390a283d415f9d303fd705cc162402ed071d616dbe7620ea683b49c28a4e"
else if stdenv.isLinux && stdenv.hostPlatform.isAarch64 then
"sha256-58770cf1f98badf0635e7f9ad05fbe31dde52557d20294a3a4fa01abcd1554eb" # From your tmuxsha256.txt for Linux arm64
# else if stdenv.isDarwin && stdenv.hostPlatform.isx86_64 then
# "sha256-41e880247972f86874aef4e60a77db93e2c2b47d857f1088b856af8e98f20d9d" # Darwin amd64
# else if stdenv.isDarwin && stdenv.hostPlatform.isAarch64 then
# "sha256-ff40f1c4605933507c8f65e3a694756740cc5b65b264457f9f454f1d9f00f8d9" # Darwin arm64
"sha256-58770cf1f98badf0635e7f9ad05fbe31dde52557d20294a3a4fa01abcd1554eb"
else throw "Unsupported platform for tmuxai precompiled binary hash: ${stdenv.hostPlatform.system}";
src = fetchurl {
@ -80,7 +70,10 @@ stdenv.mkDerivation rec {
homepage = "https://github.com/alvinunreal/tmuxai";
license = licenses.asl20;
maintainers = with maintainers; [ "death916" ];
platforms = platforms.linux ++ platforms.darwin; # Reflects available binaries
sourceProvenance = [ lib.sourceTypes.binaryTarball ]; # Corrected sourceProvenance
platforms = platforms.linux ++ platforms.darwin;
# Correct way to specify provenance for a binary fetched with fetchurl
sourceProvenance = [ src ]; # <--- CORRECTED
# If you wanted to be more explicit with the type (less common for simple fetchurl binaries):
# sourceProvenance = [ (lib.sourceTypes.binaryNativeCode // { inherit (src) urls meta; }) ];
};
}