about summary refs log tree commit diff
path: root/pkgs/applications/editors/tecoc
diff options
context:
space:
mode:
authorAndersonTorres <torres.anderson.85@protonmail.com>2021-01-18 19:36:30 -0300
committerAndersonTorres <torres.anderson.85@protonmail.com>2021-01-19 12:29:04 -0300
commitd7257afaf25edc10ad4ea808b75252a155628eb6 (patch)
treec0e33777b1e39690e24f9b859a7c617016d7f19e /pkgs/applications/editors/tecoc
parenta141de9f3a0d3c22f4dd6c8f1b8e7b90c245ea7a (diff)
downloadnixlib-d7257afaf25edc10ad4ea808b75252a155628eb6.tar
nixlib-d7257afaf25edc10ad4ea808b75252a155628eb6.tar.gz
nixlib-d7257afaf25edc10ad4ea808b75252a155628eb6.tar.bz2
nixlib-d7257afaf25edc10ad4ea808b75252a155628eb6.tar.lz
nixlib-d7257afaf25edc10ad4ea808b75252a155628eb6.tar.xz
nixlib-d7257afaf25edc10ad4ea808b75252a155628eb6.tar.zst
nixlib-d7257afaf25edc10ad4ea808b75252a155628eb6.zip
tecoc: 20150606 -> unstable-2020-11-03
Diffstat (limited to 'pkgs/applications/editors/tecoc')
-rw-r--r--pkgs/applications/editors/tecoc/default.nix54
1 files changed, 33 insertions, 21 deletions
diff --git a/pkgs/applications/editors/tecoc/default.nix b/pkgs/applications/editors/tecoc/default.nix
index 50cad500c955..f5ad8d947c7b 100644
--- a/pkgs/applications/editors/tecoc/default.nix
+++ b/pkgs/applications/editors/tecoc/default.nix
@@ -1,37 +1,47 @@
-{ lib, stdenv, fetchFromGitHub
-, ncurses }:
+{ stdenv
+, lib
+, fetchFromGitHub
+, ncurses
+}:
 
 stdenv.mkDerivation rec {
-
-  pname = "tecoc-git";
-  version = "20150606";
+  pname = "tecoc";
+  version = "unstable-2020-11-03";
 
   src = fetchFromGitHub {
     owner = "blakemcbride";
     repo = "TECOC";
-    rev = "d7dffdeb1dfb812e579d6d3b518545b23e1b50cb";
-    sha256 = "11zfa73dlx71c0hmjz5n3wqcvk6082rpb4sss877nfiayisc0njj";
+    rev = "79fcb6cfd6c5f9759f6ec46aeaf86d5806b13a0b";
+    sha256 = "sha256-JooLvoh9CxLHLOXXxE7zA7R9yglr9BGUwX4nrw2/vIw=";
   };
 
   buildInputs = [ ncurses ];
 
   makefile = if stdenv.hostPlatform.isDarwin
-  	     then "makefile.osx"
-	     else if stdenv.hostPlatform.isFreeBSD
-  	     then "makefile.bsd"
-  	     else if stdenv.hostPlatform.isOpenBSD
-  	     then "makefile.bsd"
-  	     else if stdenv.hostPlatform.isWindows
-  	     then "makefile.win"
-	     else "makefile.linux"; # I think Linux is a safe default...
+             then "makefile.osx"
+             else if stdenv.hostPlatform.isFreeBSD
+             then "makefile.bsd"
+             else if stdenv.hostPlatform.isOpenBSD
+             then "makefile.bsd"
+             else if stdenv.hostPlatform.isWindows
+             then "makefile.win"
+             else "makefile.linux"; # I think Linux is a safe default...
 
   makeFlags = [ "CC=${stdenv.cc}/bin/cc" "-C src/" ];
 
+  preInstall = ''
+    install -d $out/bin $out/share/doc/${pname}-${version} $out/lib/teco/macros
+  '';
+
   installPhase = ''
-    mkdir -p $out/bin $out/share/doc/${pname}-${version} $out/lib/teco/macros
-    cp src/tecoc $out/bin
-    cp src/aaout.txt doc/* $out/share/doc/${pname}-${version}
-    cp lib/* lib2/* $out/lib/teco/macros
+    runHook preInstall
+    install -m755 src/tecoc $out/bin
+    install -m644 src/aaout.txt doc/* $out/share/doc/${pname}-${version}
+    install -m644 lib/* lib2/* $out/lib/teco/macros
+    runHook postInstall
+  '';
+
+  postInstall = ''
     (cd $out/bin
      ln -s tecoc Make
      ln -s tecoc mung
@@ -54,9 +64,11 @@ stdenv.mkDerivation rec {
       of Editor MACroS for TECO.
 
       TECOC is a portable C implementation of TECO-11.
- '';
+    '';
     homepage = "https://github.com/blakemcbride/TECOC";
-    license = {  url = "https://github.com/blakemcbride/TECOC/tree/master/doc/readme-1st.txt"; };
+    license = {
+      url = "https://github.com/blakemcbride/TECOC/tree/master/doc/readme-1st.txt";
+    };
     maintainers = [ maintainers.AndersonTorres ];
     platforms = platforms.unix;
   };