1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-17 19:21:04 +00:00
nixpkgs/pkgs/by-name/ki/kissat/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

55 lines
1.6 KiB
Nix

{ lib, stdenv, fetchFromGitHub
, drat-trim, p7zip
}:
stdenv.mkDerivation rec {
pname = "kissat";
version = "4.0.1";
src = fetchFromGitHub {
owner = "arminbiere";
repo = "kissat";
rev = "rel-${version}";
sha256 = "sha256-+y9TlSEgnMTtRT9F6OBSle9OqGfljChcHOFJ5lgwjyk=";
};
outputs = [ "out" "dev" "lib" ];
nativeCheckInputs = [ drat-trim p7zip ];
doCheck = true;
# 'make test' assumes that /etc/passwd is not writable.
patches = [ ./writable-passwd-is-ok.patch ];
# the configure script is not generated by autotools and does not accept the
# arguments that the default configurePhase passes like --prefix and --libdir
dontAddPrefix = true;
setOutputFlags = false;
installPhase = ''
runHook preInstall
install -Dm0755 build/kissat "$out/bin/kissat"
install -Dm0644 src/kissat.h "$dev/include/kissat.h"
install -Dm0644 build/libkissat.a "$lib/lib/libkissat.a"
mkdir -p "$out/share/doc/kissat/"
install -Dm0644 {LICEN?E,README*,VERSION} "$out/share/doc/kissat/"
runHook postInstall
'';
meta = with lib; {
description = "'keep it simple and clean bare metal SAT solver' written in C";
mainProgram = "kissat";
longDescription = ''
Kissat is a "keep it simple and clean bare metal SAT solver" written in C.
It is a port of CaDiCaL back to C with improved data structures,
better scheduling of inprocessing and optimized algorithms and implementation.
'';
maintainers = with maintainers; [ shnarazk ];
platforms = platforms.unix;
license = licenses.mit;
homepage = "https://fmv.jku.at/kissat";
};
}