nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 fetchpatch,
6 python3,
7 wafHook,
8 waf,
9}:
10
11stdenv.mkDerivation (finalAttrs: {
12 pname = "pflask";
13 version = "unstable-2018-01-23";
14
15 src = fetchFromGitHub {
16 owner = "ghedo";
17 repo = "pflask";
18 rev = "9ac31ffe2ed29453218aac89ae992abbd6e7cc69";
19 hash = "sha256-bAKPUj/EipZ98kHbZiFZZI3hLVMoQpCrYKMmznpSDhg=";
20 };
21
22 patches = [
23 # Pull patch pending upstream inclusion for -fno-common toolchain support:
24 # https://github.com/ghedo/pflask/pull/30
25 (fetchpatch {
26 name = "fno-common.patch";
27 url = "https://github.com/ghedo/pflask/commit/73ba32ec48e1e0e4a56b1bceed4635711526e079.patch";
28 hash = "sha256-KVuBS7LbYJQv6NXljpSiGGja7ar7W6A6SKzkEjB1B6U=";
29 })
30 ];
31
32 waf-version = "2.0.27";
33
34 nativeBuildInputs = [
35 python3
36 (wafHook.override {
37 waf = waf.overrideAttrs (old: {
38 version = finalAttrs.waf-version;
39 src = fetchFromGitHub {
40 inherit (old.src) owner repo;
41 rev = "waf-${finalAttrs.waf-version}";
42 hash = "sha256-GeEoD5CHubwR4ndGk7J7czEf0hWtPQr88TqJDPqeK0s=";
43 };
44 });
45 })
46 ];
47
48 postInstall = ''
49 mkdir -p $out/bin
50 cp build/pflask $out/bin
51 '';
52
53 meta = {
54 description = "Lightweight process containers for Linux";
55 mainProgram = "pflask";
56 homepage = "https://ghedo.github.io/pflask/";
57 license = lib.licenses.bsd2;
58 platforms = lib.platforms.linux;
59 maintainers = with lib.maintainers; [ bot-wxt1221 ];
60 };
61})