DEVELOPMENT ENVIRONMENT

~liljamo/makeimg.nix

ref: 858e513241538ab89eef4126fdb14ffe64633ea7 makeimg.nix/default.nix -rw-r--r-- 784 bytes
858e5132Jonni Liljamo feat: add sudo to bins 8 days ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
{
  makeWrapper,
  lib,
  pkgs,
  stdenv,
  coreutils,
  util-linux,
  e2fsprogs,
  parted,
  apk-tools,
  findutils,
  patch,
  pass,
  sudo,
  ...
}: let
in
  stdenv.mkDerivation rec {
    pname = "makeimg";
    version = "0.14.0";

    src = pkgs.fetchFromSourcehut {
      owner = "~bitfehler";
      repo = "makeimg";
      tag = "v${version}";
      hash = "sha256-cLCLCG0+ShFazuVBG9GcvVmQNJtuMkKdGEP3QNJPTAo=";
    };

    dontBuild = true;

    nativeBuildInputs = [makeWrapper];
    installPhase = ''
      install -Dm755 -t $out/bin makeimg
      wrapProgram $out/bin/makeimg --set PATH ${lib.makeBinPath [
        coreutils
        util-linux
        e2fsprogs
        parted
        apk-tools
        findutils
        patch
        pass
        sudo
      ]}
    '';
  }