From f6205eedda7b3829dd55a8c213289e24a16b2cf1 Mon Sep 17 00:00:00 2001 From: Anderson Torres Date: Mon, 29 May 2023 23:42:17 -0300 Subject: [PATCH] tecoc: rewrite expression --- pkgs/applications/editors/tecoc/default.nix | 36 ++++++++++----------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/pkgs/applications/editors/tecoc/default.nix b/pkgs/applications/editors/tecoc/default.nix index f5ad8d947c7b..df0ddf34d201 100644 --- a/pkgs/applications/editors/tecoc/default.nix +++ b/pkgs/applications/editors/tecoc/default.nix @@ -4,7 +4,7 @@ , ncurses }: -stdenv.mkDerivation rec { +stdenv.mkDerivation { pname = "tecoc"; version = "unstable-2020-11-03"; @@ -12,7 +12,7 @@ stdenv.mkDerivation rec { owner = "blakemcbride"; repo = "TECOC"; rev = "79fcb6cfd6c5f9759f6ec46aeaf86d5806b13a0b"; - sha256 = "sha256-JooLvoh9CxLHLOXXxE7zA7R9yglr9BGUwX4nrw2/vIw="; + hash = "sha256-JooLvoh9CxLHLOXXxE7zA7R9yglr9BGUwX4nrw2/vIw="; }; buildInputs = [ ncurses ]; @@ -27,29 +27,30 @@ stdenv.mkDerivation rec { 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 - ''; + makeFlags = [ "CC=${stdenv.cc.targetPrefix}cc" "-C src/" ]; installPhase = '' runHook preInstall + + install -d $out/bin $out/share/doc/tecoc $out/lib/teco/macros install -m755 src/tecoc $out/bin - install -m644 src/aaout.txt doc/* $out/share/doc/${pname}-${version} + install -m644 src/aaout.txt doc/* $out/share/doc/tecoc install -m644 lib/* lib2/* $out/lib/teco/macros + runHook postInstall ''; - postInstall = '' - (cd $out/bin - ln -s tecoc Make - ln -s tecoc mung - ln -s tecoc teco - ln -s tecoc Inspect ) + postFixup = '' + pushd $out/bin + ln -s tecoc Make + ln -s tecoc mung + ln -s tecoc teco + ln -s tecoc Inspect + popd ''; - meta = with lib; { + meta = { + homepage = "https://github.com/blakemcbride/TECOC"; description = "A clone of the good old TECO editor"; longDescription = '' For those who don't know: TECO is the acronym of Tape Editor and COrrector @@ -65,11 +66,10 @@ stdenv.mkDerivation rec { 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"; }; - maintainers = [ maintainers.AndersonTorres ]; - platforms = platforms.unix; + maintainers = [ lib.maintainers.AndersonTorres ]; + platforms = lib.platforms.unix; }; }