about summary refs log tree commit diff
path: root/pkgs/applications/office/kitsas
diff options
context:
space:
mode:
authorgspia <iahogsp@gmail.com>2021-03-06 17:52:57 +0200
committergspia <iahogsp@gmail.com>2021-04-10 07:57:13 +0300
commit8d75eaf225deb277a70bfb091b51dde52c0cfac9 (patch)
treef71d0ee517fbd7cc8cad2c076abcbf28eb97fd28 /pkgs/applications/office/kitsas
parentca743d55d57bc81923d3da6d5252cabf57550580 (diff)
kitsas: init at 2.3
Add kitsas, an accounting application

This commit adds an accounting application called kitsas to the
set of packages. Kitsas is suitable for Finnish associations and
small business.

Change meta maintainers

Change the meta license line

Add newlines

Change the top level caller

Start using qmakeFlags

Second review round changes

Change license to non-deprecated one

Typo in the license constant
Diffstat (limited to 'pkgs/applications/office/kitsas')
-rw-r--r--pkgs/applications/office/kitsas/default.nix51
1 files changed, 51 insertions, 0 deletions
diff --git a/pkgs/applications/office/kitsas/default.nix b/pkgs/applications/office/kitsas/default.nix
new file mode 100644
index 0000000000000..0adfa748c0184
--- /dev/null
+++ b/pkgs/applications/office/kitsas/default.nix
@@ -0,0 +1,51 @@
+{ lib, mkDerivation, fetchFromGitHub, qmake, qtsvg, qtcreator, poppler, libzip, pkg-config }:
+
+mkDerivation rec {
+  pname = "kitsas";
+  version = "2.3";
+
+  src = fetchFromGitHub {
+    owner = "artoh";
+    repo = "kitupiikki";
+    rev = "v${version}";
+    sha256 = "1qac6cxkb45rs5pschsf2rvpa789g27shmrwpshwahqzhw42xvgl";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+
+  buildInputs = [ qmake qtsvg poppler libzip ];
+
+  # We use a separate build-dir as otherwise ld seems to get confused between
+  # directory and executable name on buildPhase.
+  preConfigure = ''
+    mkdir build-linux
+    cd build-linux
+  '';
+
+  qmakeFlags = [
+    "../kitsas/kitsas.pro"
+    "-spec"
+    "linux-g++"
+    "CONFIG+=release"
+  ];
+
+  preFixup = ''
+    make clean
+    rm Makefile
+  '';
+
+  installPhase = ''
+    mkdir -p $out/bin $out/share/applications
+    cp kitsas $out/bin
+    cp $src/kitsas.png $out/share/applications
+    cp $src/kitsas.desktop $out/share/applications
+  '';
+
+  meta = with lib; {
+    homepage = "https://github.com/artoh/kitupiikki";
+    description = "An accounting tool suitable for Finnish associations and small business";
+    maintainers = with maintainers; [ gspia ];
+    license = licenses.gpl3Plus;
+    platforms = platforms.linux;
+  };
+}