From ddc0d431154487490ce6018eef969d0578afae85 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Thu, 15 Jan 2015 22:20:42 +0100 Subject: [PATCH 1/4] Add package: ctodo --- pkgs/applications/misc/ctodo/default.nix | 27 ++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 5 +++++ 2 files changed, 32 insertions(+) create mode 100644 pkgs/applications/misc/ctodo/default.nix diff --git a/pkgs/applications/misc/ctodo/default.nix b/pkgs/applications/misc/ctodo/default.nix new file mode 100644 index 000000000000..fbb1701dd226 --- /dev/null +++ b/pkgs/applications/misc/ctodo/default.nix @@ -0,0 +1,27 @@ +{ stdenv, cmake, fetchgit, ncurses }: + +let + version = "1.1"; +in +stdenv.mkDerivation { + name = "ctodo-${version}"; + + src = fetchgit { + url = "https://github.com/Acolarh/ctodo.git"; + rev = "de478f5028a1b167bfdb6dd4160d83d9ef7db839"; + sha256 = "3a43a6237e8fe5b37ca7d5abc88c20158f2cff1f8b98762c404e6f24d4b7993e"; + }; + + buildInputs = [ stdenv cmake ncurses ]; + + configurePhase = '' + cmake -DCMAKE_INSTALL_PREFIX=$out . + ''; + + meta = { + homepage = "http://ctodo.apakoh.dk/"; + description = "A simple ncurses-based task list manager."; + license = stdenv.lib.licenses.mit; + maintainers = [ stdenv.lib.maintainers.matthiasbeyer ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 895977fc4fa7..bdb456209961 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4540,6 +4540,11 @@ let inherit pkgs ctags writeScriptBin; }; + ctodo = callPackage ../applications/misc/ctodo { + cmake = cmake; + ncurses = ncurses; + }; + cmake = callPackage ../development/tools/build-managers/cmake { }; cmake-3_0 = callPackage ../development/tools/build-managers/cmake/3.0.nix { }; From 76583470c5e7ee1c6951475e3aaff1266c38f717 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Fri, 16 Jan 2015 11:32:12 +0100 Subject: [PATCH 2/4] Fixup: Remove x=x lines in all-packages.nix --- pkgs/top-level/all-packages.nix | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index bdb456209961..f2b345c084f1 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4540,10 +4540,7 @@ let inherit pkgs ctags writeScriptBin; }; - ctodo = callPackage ../applications/misc/ctodo { - cmake = cmake; - ncurses = ncurses; - }; + ctodo = callPackage ../applications/misc/ctodo { }; cmake = callPackage ../development/tools/build-managers/cmake { }; From f3f06fc1ccf9e8df07349483ea60f5266eba23c9 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Fri, 16 Jan 2015 17:17:35 +0100 Subject: [PATCH 3/4] Fixup: Use archive instead of git clone --- pkgs/applications/misc/ctodo/default.nix | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/pkgs/applications/misc/ctodo/default.nix b/pkgs/applications/misc/ctodo/default.nix index fbb1701dd226..a6cac37e8ee6 100644 --- a/pkgs/applications/misc/ctodo/default.nix +++ b/pkgs/applications/misc/ctodo/default.nix @@ -1,4 +1,4 @@ -{ stdenv, cmake, fetchgit, ncurses }: +{ stdenv, cmake, fetchurl, ncurses }: let version = "1.1"; @@ -6,10 +6,9 @@ in stdenv.mkDerivation { name = "ctodo-${version}"; - src = fetchgit { - url = "https://github.com/Acolarh/ctodo.git"; - rev = "de478f5028a1b167bfdb6dd4160d83d9ef7db839"; - sha256 = "3a43a6237e8fe5b37ca7d5abc88c20158f2cff1f8b98762c404e6f24d4b7993e"; + src = fetchurl { + url = "https://github.com/Acolarh/ctodo/archive/v1.1.tar.gz"; + sha256 = "1sv5p1b08pp73qshakz4qy4pjglxz2pvx2cjfx52i3532hd3xcaf"; }; buildInputs = [ stdenv cmake ncurses ]; From 91e4ef34887063a4457ad1ad8bf643231be404d3 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Fri, 16 Jan 2015 17:18:06 +0100 Subject: [PATCH 4/4] Fixup: Add platform --- pkgs/applications/misc/ctodo/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/applications/misc/ctodo/default.nix b/pkgs/applications/misc/ctodo/default.nix index a6cac37e8ee6..3978a369d06f 100644 --- a/pkgs/applications/misc/ctodo/default.nix +++ b/pkgs/applications/misc/ctodo/default.nix @@ -22,5 +22,6 @@ stdenv.mkDerivation { description = "A simple ncurses-based task list manager."; license = stdenv.lib.licenses.mit; maintainers = [ stdenv.lib.maintainers.matthiasbeyer ]; + platforms = stdenv.lib.platforms.linux; }; }