mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-29 10:23:29 +00:00
571c71e6f7
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.
54 lines
1.3 KiB
Nix
54 lines
1.3 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchFromGitHub
|
|
, meson
|
|
, ninja
|
|
, python3
|
|
, nix-update-script
|
|
, testers
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "libvarlink";
|
|
version = "23";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "varlink";
|
|
repo = "libvarlink";
|
|
rev = finalAttrs.version;
|
|
sha256 = "sha256-oUy9HhybNMjRBWoqqal1Mw8cC5RddgN4izxAl0cgnKE=";
|
|
};
|
|
|
|
nativeBuildInputs = [ meson ninja python3 ];
|
|
|
|
postPatch = ''
|
|
# test-object: ../lib/test-object.c:129: main: Assertion `setlocale(LC_NUMERIC, "de_DE.UTF-8") != 0' failed.
|
|
# PR that added it https://github.com/varlink/libvarlink/pull/27
|
|
substituteInPlace lib/test-object.c \
|
|
--replace 'assert(setlocale(LC_NUMERIC, "de_DE.UTF-8") != 0);' ""
|
|
|
|
patchShebangs lib/test-symbols.sh varlink-wrapper.py
|
|
'';
|
|
|
|
doCheck = true;
|
|
|
|
passthru = {
|
|
updateScript = nix-update-script { };
|
|
tests = {
|
|
version = testers.testVersion {
|
|
package = finalAttrs.finalPackage;
|
|
command = "varlink --version";
|
|
};
|
|
};
|
|
};
|
|
|
|
meta = with lib; {
|
|
description = "C implementation of the Varlink protocol and command line tool";
|
|
mainProgram = "varlink";
|
|
homepage = "https://github.com/varlink/libvarlink";
|
|
license = licenses.asl20;
|
|
maintainers = with maintainers; [ artturin ];
|
|
platforms = platforms.linux;
|
|
};
|
|
})
|