mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-09 14:33:22 +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.
61 lines
1.1 KiB
Nix
61 lines
1.1 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchFromGitHub
|
|
, asciidoc
|
|
, libcap
|
|
, pkg-config
|
|
, systemdLibs
|
|
, installShellFiles
|
|
, nixosTests
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "isolate";
|
|
version = "2.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "ioi";
|
|
repo = "isolate";
|
|
rev = "v${version}";
|
|
hash = "sha256-kKXkXPVB9ojyIERvEdkHkXC//Agin8FPcpTBmTxh/ZE=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
asciidoc
|
|
installShellFiles
|
|
pkg-config
|
|
];
|
|
|
|
buildInputs = [
|
|
libcap.dev
|
|
systemdLibs.dev
|
|
];
|
|
|
|
patches = [
|
|
./take-config-file-from-env.patch
|
|
];
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
install -Dm755 ./isolate $out/bin/isolate
|
|
install -Dm755 ./isolate-cg-keeper $out/bin/isolate-cg-keeper
|
|
install -Dm755 ./isolate-check-environment $out/bin/isolate-check-environment
|
|
installManPage isolate.1
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
passthru.tests = {
|
|
isolate = nixosTests.isolate;
|
|
};
|
|
|
|
meta = {
|
|
description = "Sandbox for securely executing untrusted programs";
|
|
mainProgram = "isolate";
|
|
homepage = "https://github.com/ioi/isolate";
|
|
license = lib.licenses.gpl2Plus;
|
|
maintainers = with lib.maintainers; [ virchau13 ];
|
|
};
|
|
}
|