diff options
author | Alyssa Ross <hi@alyssa.is> | 2024-03-24 11:04:41 +0100 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2024-03-24 11:04:41 +0100 |
commit | 5423cabbbf2b6dec5568f1ecabd288d5d9a642ec (patch) | |
tree | f316a6a921bfefd3a63bd4502c2eb50ff1644f67 /nixpkgs/pkgs/by-name/ta | |
parent | 46a88117a05c3469af5d99433af140c3de8ca088 (diff) | |
parent | 8aa81f34981add12aecada6c702ddbbd0375ca36 (diff) | |
download | nixlib-5423cabbbf2b6dec5568f1ecabd288d5d9a642ec.tar nixlib-5423cabbbf2b6dec5568f1ecabd288d5d9a642ec.tar.gz nixlib-5423cabbbf2b6dec5568f1ecabd288d5d9a642ec.tar.bz2 nixlib-5423cabbbf2b6dec5568f1ecabd288d5d9a642ec.tar.lz nixlib-5423cabbbf2b6dec5568f1ecabd288d5d9a642ec.tar.xz nixlib-5423cabbbf2b6dec5568f1ecabd288d5d9a642ec.tar.zst nixlib-5423cabbbf2b6dec5568f1ecabd288d5d9a642ec.zip |
Merge branch 'nixos-unstable-small' of https://github.com/NixOS/nixpkgs
Diffstat (limited to 'nixpkgs/pkgs/by-name/ta')
-rw-r--r-- | nixpkgs/pkgs/by-name/ta/tabby/package.nix | 10 | ||||
-rw-r--r-- | nixpkgs/pkgs/by-name/ta/tana/package.nix | 111 |
2 files changed, 113 insertions, 8 deletions
diff --git a/nixpkgs/pkgs/by-name/ta/tabby/package.nix b/nixpkgs/pkgs/by-name/ta/tabby/package.nix index fa52d372ab9a..e1d216f44b7b 100644 --- a/nixpkgs/pkgs/by-name/ta/tabby/package.nix +++ b/nixpkgs/pkgs/by-name/ta/tabby/package.nix @@ -97,8 +97,6 @@ let cudaBuildInputs = [ llamaccpPackage ]; rocmBuildInputs = [ llamaccpPackage ]; - LLAMA_CPP_LIB = "${llamaccpPackage.outPath}/lib"; - in rustPlatform.buildRustPackage { inherit pname version; @@ -139,7 +137,7 @@ rustPlatform.buildRustPackage { ] ++ optionals enableCuda [ # TODO: Replace with autoAddDriverRunpath # once https://github.com/NixOS/nixpkgs/pull/275241 has been merged - cudaPackages.autoAddOpenGLRunpathHook + cudaPackages.autoAddDriverRunpath ]; buildInputs = [ openssl ] @@ -148,11 +146,7 @@ rustPlatform.buildRustPackage { ++ optionals enableRocm rocmBuildInputs ; - env = lib.mergeAttrsList [ - { inherit LLAMA_CPP_LIB; } - # Work around https://github.com/NixOS/nixpkgs/issues/166205 - (lib.optionalAttrs stdenv.cc.isClang { NIX_LDFLAGS = "-l${stdenv.cc.libcxx.cxxabi.libName}"; }) - ]; + env.LLAMA_CPP_LIB = "${lib.getLib llamaccpPackage}/lib"; patches = [ ./0001-nix-build-use-nix-native-llama-cpp-package.patch ]; # Fails with: diff --git a/nixpkgs/pkgs/by-name/ta/tana/package.nix b/nixpkgs/pkgs/by-name/ta/tana/package.nix new file mode 100644 index 000000000000..0034f72725c6 --- /dev/null +++ b/nixpkgs/pkgs/by-name/ta/tana/package.nix @@ -0,0 +1,111 @@ +{ libX11 +, libxcb +, libXcomposite +, libXdamage +, libXext +, libXfixes +, libXrandr +, stdenv +, lib +, alsa-lib +, at-spi2-atk +, atkmm +, cairo +, cups +, dbus +, expat +, glib +, gtk3 +, libdrm +, libglvnd +, libxkbcommon +, mesa +, nspr +, nss +, pango +, systemd +, fetchurl +, autoPatchelfHook +, dpkg +}: +let + glLibs = [ libglvnd mesa ]; + libs = [ + alsa-lib + atkmm + at-spi2-atk + cairo + cups + dbus + expat + glib + gtk3 + libdrm + libX11 + libxcb + libXcomposite + libXdamage + libXext + libXfixes + libxkbcommon + libXrandr + nspr + nss + pango + ]; + buildInputs = glLibs ++ libs; + runpathPackages = glLibs ++ [ stdenv.cc.cc stdenv.cc.libc ]; + version = "1.0.15"; +in +stdenv.mkDerivation { + pname = "tana"; + inherit version buildInputs; + + src = fetchurl { + url = "https://github.com/tanainc/tana-desktop-releases/releases/download/v${version}/tana_${version}_amd64.deb"; + hash = "sha256-94AyAwNFN5FCol97US1Pv8IN1+WMRA3St9kL2w+9FJU="; + }; + + nativeBuildInputs = [ + autoPatchelfHook + dpkg + ]; + + appendRunpaths = map (pkg: "${lib.getLib pkg}/lib") runpathPackages ++ [ "${placeholder "out"}/lib/tana" ]; + + # Needed for Zygote + runtimeDependencies = [ + systemd + ]; + + installPhase = '' + runHook preInstall + mkdir -p $out + cp -r usr/* $out + runHook postInstall + ''; + + postFixup = '' + substituteInPlace $out/share/applications/tana.desktop \ + --replace "Exec=tana" "Exec=$out/bin/tana" \ + --replace "Name=tana" "Name=Tana" + ''; + + meta = with lib; { + description = "Tana is an intelligent all-in-one workspace"; + longDescription = '' + At its core, Tana is an outline editor which can be extended to + cover multiple use-cases and different workflows. + For individuals, it supports GTD, P.A.R.A., Zettelkasten note-taking + out of the box. Teams can leverage the powerful project management + views, like Kanban. + To complete all, a powerful AI system is integrated to help with most + of the tasks. + ''; + homepage = "https://tana.inc"; + license = licenses.unfree; + maintainers = [ maintainers.massimogengarelli ]; + platforms = platforms.linux; + mainProgram = "tana"; + }; +} |