nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 rofi,
6 systemd,
7 coreutils,
8 util-linux,
9 gawk,
10 makeWrapper,
11 jq,
12}:
13
14stdenv.mkDerivation rec {
15 pname = "rofi-systemd";
16 version = "0.1.1";
17
18 src = fetchFromGitHub {
19 owner = "IvanMalison";
20 repo = "rofi-systemd";
21 rev = "v${version}";
22 sha256 = "0lgffb6rk1kf91j4j303lzpx8w2g9zy2gk99p8g8pk62a30c5asm";
23 };
24
25 nativeBuildInputs = [ makeWrapper ];
26
27 dontBuild = true;
28
29 installPhase = ''
30 mkdir -p $out/bin
31 cp -a rofi-systemd $out/bin/rofi-systemd
32 '';
33
34 wrapperPath = lib.makeBinPath [
35 coreutils
36 gawk
37 jq
38 rofi
39 systemd
40 util-linux
41 ];
42
43 fixupPhase = ''
44 patchShebangs $out/bin
45
46 wrapProgram $out/bin/rofi-systemd --prefix PATH : "${wrapperPath}"
47 '';
48
49 meta = {
50 description = "Control your systemd units using rofi";
51 homepage = "https://github.com/IvanMalison/rofi-systemd";
52 maintainers = with lib.maintainers; [ imalison ];
53 license = lib.licenses.gpl3;
54 platforms = with lib.platforms; linux;
55 mainProgram = "rofi-systemd";
56 };
57}