From ae54adf8ff94faf6ce8be85a70a43f5188628342 Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Wed, 12 Jan 2022 05:04:15 +0100 Subject: [PATCH] =?UTF-8?q?treesheets:=201.0.1=20=E2=86=92=20unstable-2022?= =?UTF-8?q?-03-12?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Switch to unstable, using tagged releases is discouraged: https://github.com/aardappel/treesheets/issues/150#issuecomment-874213576 - Also add updateScript to that effect. - CMake is now preferred on Linux, and it installs files to proper locations: https://github.com/aardappel/treesheets/pull/201 - CMake does not set version correctly so we need to do it ourselves. - Format the expression. --- .../office/treesheets/default.nix | 58 +++++++++---------- 1 file changed, 27 insertions(+), 31 deletions(-) diff --git a/pkgs/applications/office/treesheets/default.nix b/pkgs/applications/office/treesheets/default.nix index d8fe8649381d..91716ee31dda 100644 --- a/pkgs/applications/office/treesheets/default.nix +++ b/pkgs/applications/office/treesheets/default.nix @@ -1,41 +1,37 @@ -{ lib, stdenv, fetchFromGitHub, wxGTK, makeWrapper }: +{ lib +, stdenv +, fetchFromGitHub +, wxGTK +, cmake +, ninja +, unstableGitUpdater +}: stdenv.mkDerivation rec { pname = "treesheets"; - version = "1.0.1"; + version = "unstable-2022-03-12"; src = fetchFromGitHub { - owner = "aardappel"; - repo = "treesheets"; - rev = "v${version}"; - sha256 = "0krsj7i5yr76imf83krz2lmlmpbsvpwqg2d4r0jwxiydjfyj4qr4"; + owner = "aardappel"; + repo = "treesheets"; + rev = "120c10d4d9ea1ce76db5c1bbd6f5d705b397b57d"; + sha256 = "oXgOvvRoZpueEeWnD3jsc6y5RIAzkXzLeEe7BSErBpw="; }; - nativeBuildInputs = [ makeWrapper ]; - buildInputs = [ wxGTK ]; + nativeBuildInputs = [ + cmake + ninja + ]; - preConfigure = "cd src"; + buildInputs = [ + wxGTK + ]; - postInstall = '' - mkdir "$out/share" -p - cp -av ../TS "$out/share/libexec" + NIX_CFLAGS_COMPILE = "-DPACKAGE_VERSION=\"${builtins.replaceStrings [ "unstable-" ] [ "" ] version}\""; - mkdir "$out/bin" -p - makeWrapper "$out/share/libexec/treesheets" "$out/bin/treesheets" - - mkdir "$out/share/doc" -p - - for f in readme.html docs examples - do - mv -v "$out/share/libexec/$f" "$out/share/doc" - ln -sv "$out/share/doc/$f" "$out/share/libexec/$f" - done - - mkdir "$out/share/applications" -p - mv -v "$out/share/libexec/treesheets.desktop" "$out/share/applications" - substituteInPlace "$out/share/applications/treesheets.desktop" \ - --replace "Icon=images/treesheets.svg" "Icon=$out/share/libexec/images/treesheets.svg" - ''; + passthru = { + updateScript = unstableGitUpdater { }; + }; meta = with lib; { description = "Free Form Data Organizer"; @@ -49,9 +45,9 @@ stdenv.mkDerivation rec { planning, requirements gathering, presentation of information, etc. ''; - homepage = "https://strlen.com/treesheets/"; + homepage = "https://strlen.com/treesheets/"; maintainers = with maintainers; [ obadz avery ]; - platforms = platforms.linux; - license = licenses.zlib; + platforms = platforms.linux; + license = licenses.zlib; }; }