Commit c0e793cd authored by emaryn's avatar emaryn
Browse files
parent b9b87f92
Loading
Loading
Loading
Loading
+8 −8
Original line number Diff line number Diff line
@@ -10,14 +10,14 @@

python3Packages.buildPythonApplication rec {
  pname = "nwg-hello";
  version = "0.3.1";
  version = "0.4.0";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "nwg-piotr";
    repo = "nwg-hello";
    tag = "v${version}";
    hash = "sha256-ZqZikkwV3UVA0e9VCFHjXAAIegvz3I6CNURZSP4owmU=";
    hash = "sha256-yevcHctVnUWuPsdB+KN+Uuxg+iGdzP7WOOTMUvVmuEY=";
  };

  nativeBuildInputs = [
@@ -39,15 +39,15 @@ python3Packages.buildPythonApplication rec {
  postPatch = ''
    # hard coded paths
    substituteInPlace nwg_hello/main.py \
      --replace '/etc/nwg-hello' "$out/etc/nwg-hello" \
      --replace "/usr/share/xsessions" "/run/current-system/sw/share/xsessions" \
      --replace "/usr/share/wayland-sessions" "/run/current-system/sw/share/wayland-sessions"
      --replace-fail '/etc/nwg-hello' "$out/etc/nwg-hello" \
      --replace-fail "/usr/share/xsessions" "/run/current-system/sw/share/xsessions" \
      --replace-fail "/usr/share/wayland-sessions" "/run/current-system/sw/share/wayland-sessions"

    substituteInPlace nwg-hello-default.json \
      --replace "/usr/share/xsessions" "/run/current-system/sw/share/xsessions" \
      --replace "/usr/share/wayland-sessions" "/run/current-system/sw/share/wayland-sessions"
      --replace-fail "/usr/share/xsessions" "/run/current-system/sw/share/xsessions" \
      --replace-fail "/usr/share/wayland-sessions" "/run/current-system/sw/share/wayland-sessions"

    substituteInPlace nwg_hello/ui.py --replace '/usr/share/nwg-hello' "$out/share/nwg-hello"
    substituteInPlace nwg_hello/ui.py --replace-fail '/usr/share/nwg-hello' "$out/share/nwg-hello"
  '';

  postInstall = ''