Unverified Commit a257811c authored by Felix Bühler's avatar Felix Bühler Committed by GitHub
Browse files

woeusb-ng: migrate to pyproject and modernize packaging (#465788)

parents 1207b8b1 02446bf7
Loading
Loading
Loading
Loading
+20 −14
Original line number Diff line number Diff line
@@ -8,20 +8,20 @@
  grub2,
}:

with python3Packages;

buildPythonApplication rec {
python3Packages.buildPythonApplication rec {
  pname = "woeusb-ng";
  version = "0.2.12";
  format = "setuptools";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "WoeUSB";
    repo = "WoeUSB-ng";
    rev = "v${version}";
    tag = "v${version}";
    hash = "sha256-2opSiXbbk0zDRt6WqMh97iAt6/KhwNDopOas+OZn6TU=";
  };

  build-system = [ python3Packages.setuptools ];

  postPatch = ''
    substituteInPlace setup.py WoeUSB/utils.py \
      --replace-fail "/usr/local/" "$out/" \
@@ -35,16 +35,22 @@ buildPythonApplication rec {
  ];
  dontWrapGApps = true;
  preFixup = ''
    makeWrapperArgs+=("''${gappsWrapperArgs[@]}")
  '';

  propagatedBuildInputs = [
    makeWrapperArgs+=(
      "''${gappsWrapperArgs[@]}"
      --prefix PATH : "${
        lib.makeBinPath [
          p7zip
          parted
          grub2
    termcolor
    wxpython
    six
        ]
      }"
    )
  '';

  dependencies = [
    python3Packages.termcolor
    python3Packages.wxpython
    python3Packages.six
  ];

  preConfigure = ''
@@ -59,7 +65,7 @@ buildPythonApplication rec {
    homepage = "https://github.com/WoeUSB/WoeUSB-ng";
    mainProgram = "woeusb";
    license = lib.licenses.gpl3Plus;
    maintainers = with lib.maintainers; [ stunkymonkey ];
    maintainers = [ lib.maintainers.stunkymonkey ];
    platforms = lib.platforms.linux;
  };
}