about summary refs log tree commit diff
path: root/nixpkgs/pkgs/by-name/ws/wslu/package.nix
blob: 422b8e76efb68d886012ad2a39fac4ea01d84b3d (plain) (blame)
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
{ lib
, stdenv
, fetchFromGitHub
, copyDesktopItems
}:

stdenv.mkDerivation rec {
  pname = "wslu";
  version = "4.1.1";

  src = fetchFromGitHub {
    owner = "wslutilities";
    repo = "wslu";
    rev = "v${version}";
    hash = "sha256-yhugh836BoSISbTu19ubLOrz5X31Opu5QtCR0DXrbWc=";
  };

  nativeBuildInputs = [ copyDesktopItems ];

  patches = [
    ./fallback-conf-nix-store.diff
    ./fix-desktop-item.patch
  ];

  postPatch = ''
    substituteInPlace src/wslu-header \
      --subst-var out
  '';

  makeFlags = [
    "DESTDIR=$(out)"
    "PREFIX="
  ];

  desktopItems = [ "src/etc/wslview.desktop" ];

  meta = with lib; {
    description = "A collection of utilities for Windows Subsystem for Linux";
    homepage = "https://github.com/wslutilities/wslu";
    changelog = "https://github.com/wslutilities/wslu/releases/tag/v${version}";
    license = licenses.gpl3Plus;
    maintainers = with maintainers; [ jamiemagee ];
    platforms = platforms.linux;
  };
}