nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 52 lines 1.2 kB view raw
1{ 2 lib, 3 stdenv, 4 swi-prolog, 5 makeWrapper, 6 fetchFromGitHub, 7 lexiconPath ? "prolog/lexicon/clex_lexicon.pl", 8 pname ? "ape", 9 description ? "Parser for Attempto Controlled English (ACE)", 10 license ? lib.licenses.lgpl3, 11}: 12 13stdenv.mkDerivation { 14 inherit pname; 15 version = "2019-08-10"; 16 17 nativeBuildInputs = [ makeWrapper ]; 18 buildInputs = [ swi-prolog ]; 19 20 src = fetchFromGitHub { 21 owner = "Attempto"; 22 repo = "APE"; 23 rev = "113b81621262d7a395779465cb09397183e6f74c"; 24 sha256 = "0xyvna2fbr18hi5yvm0zwh77q02dfna1g4g53z9mn2rmlfn2mhjh"; 25 }; 26 27 patchPhase = '' 28 # We move the file first to avoid "same file" error in the default case 29 cp ${lexiconPath} new_lexicon.pl 30 rm prolog/lexicon/clex_lexicon.pl 31 cp new_lexicon.pl prolog/lexicon/clex_lexicon.pl 32 ''; 33 34 buildPhase = '' 35 make SHELL=${stdenv.shell} build 36 ''; 37 38 installPhase = '' 39 mkdir -p $out/bin 40 cp ape.exe $out 41 makeWrapper $out/ape.exe $out/bin/ape --add-flags ace 42 ''; 43 44 meta = with lib; { 45 description = description; 46 homepage = "https://github.com/Attempto/APE"; 47 license = license; 48 platforms = platforms.unix; 49 maintainers = with maintainers; [ yrashk ]; 50 mainProgram = "ape"; 51 }; 52}