nixpkgs/pkgs/by-name/ve/verifast/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

52 lines
1.5 KiB
Nix

{ lib, stdenv, fetchurl, gtk2, gdk-pixbuf, atk, pango, glib, cairo, freetype
, fontconfig, libxml2, gnome2 }:
let
libPath = lib.makeLibraryPath
[ stdenv.cc.libc stdenv.cc.cc gtk2 gdk-pixbuf atk pango glib cairo
freetype fontconfig libxml2 gnome2.gtksourceview
] + ":${lib.getLib stdenv.cc.cc}/lib64:$out/libexec";
patchExe = x: ''
patchelf --interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath ${libPath} ${x}
'';
patchLib = x: ''
patchelf --set-rpath ${libPath} ${x}
'';
in
stdenv.mkDerivation rec {
pname = "verifast";
version = "24.08.30";
src = fetchurl {
url = "https://github.com/verifast/verifast/releases/download/${version}/${pname}-${version}-linux.tar.gz";
sha256 = "sha256-hIS5e+zVlxSOqr1/ZDy0PangyWjB9uLCvN8Qr688msg=";
};
dontConfigure = true;
dontStrip = true;
installPhase = ''
mkdir -p $out/bin
cp -R bin $out/libexec
${patchExe "$out/libexec/verifast"}
${patchExe "$out/libexec/vfide"}
${patchLib "$out/libexec/libz3.so"}
ln -s $out/libexec/verifast $out/bin/verifast
ln -s $out/libexec/vfide $out/bin/vfide
'';
meta = {
description = "Verification for C and Java programs via separation logic";
homepage = "https://people.cs.kuleuven.be/~bart.jacobs/verifast/";
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
license = lib.licenses.mit;
platforms = [ "x86_64-linux" ];
maintainers = [ lib.maintainers.thoughtpolice ];
};
}