aboutsummaryrefslogtreecommitdiff
path: root/pkgs/theme/swaybackground.nix
blob: 8b4be5a96b9d6b7edda37742d2f1cd60a4946719 (plain)
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
{
  lib,
  stdenvNoCC,
  makeWrapper,
  bash,
  jq,
  sway,
  background-lnxpcs,
}:
stdenvNoCC.mkDerivation {
  pname = "swaybackground";
  version = "1.0";
  meta = with lib; {
    license = licenses.gpl3;
    platforms = platforms.linux;
  };

  nativeBuildInputs = [makeWrapper];
  phases = ["installPhase"];
  installPhase = ''
    mkdir -p $out/bin
    cp ${./swaybackground.sh} $out/bin/swaybackground
    wrapProgram $out/bin/swaybackground \
      --prefix PATH : ${lib.makeBinPath [bash jq sway]} \
      --prefix BACKGROUND_LNXPCS : ${background-lnxpcs}
  '';
}