nixpkgs/pkgs/by-name/cl/clips/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

43 lines
1.2 KiB
Nix

{ lib, stdenv, fetchurl }:
stdenv.mkDerivation rec {
version = "6.4.1";
pname = "clips";
src = fetchurl {
url = "mirror://sourceforge/clipsrules/CLIPS/${version}/clips_core_source_${
builtins.replaceStrings [ "." ] [ "" ] version
}.tar.gz";
hash = "sha256-qk87uLFZZL9HNPNlyVh+Mplr3dP1C/z1O5UVS+rnbuM=";
};
postPatch = ''
substituteInPlace core/makefile --replace 'gcc' '${stdenv.cc.targetPrefix}cc'
'';
makeFlags = [ "-C" "core" ];
installPhase = ''
runHook preInstall
install -D -t $out/bin core/clips
install -D -t $out/lib core/libclips.a
install -D -t $out/include core/*.h
runHook postInstall
'';
meta = with lib; {
description = "Tool for Building Expert Systems";
mainProgram = "clips";
homepage = "http://www.clipsrules.net/";
longDescription = ''
Developed at NASA's Johnson Space Center from 1985 to 1996,
CLIPS is a rule-based programming language useful for creating
expert systems and other programs where a heuristic solution is
easier to implement and maintain than an algorithmic solution.
'';
license = licenses.publicDomain;
maintainers = [ maintainers.league ];
platforms = platforms.unix;
};
}