Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 copyDesktopItems,
6}:
7
8stdenv.mkDerivation (finalAttrs: {
9 pname = "wslu";
10 version = "4.1.4";
11
12 src = fetchFromGitHub {
13 owner = "wslutilities";
14 repo = "wslu";
15 tag = "v${finalAttrs.version}";
16 hash = "sha256-ssiwYkQg2rOirC/ZZVq2bJm4Ggc364uRkoS2y365Eb0=";
17 };
18
19 nativeBuildInputs = [ copyDesktopItems ];
20
21 patches = [
22 ./fallback-conf-nix-store.diff
23 ];
24
25 postPatch = ''
26 substituteInPlace src/wslu-header \
27 --subst-var out
28 substituteInPlace src/etc/wslview.desktop \
29 --replace-fail /usr/bin/wslview wslview
30 '';
31
32 makeFlags = [
33 "DESTDIR=$(out)"
34 "PREFIX="
35 ];
36
37 meta = {
38 description = "Collection of utilities for Windows Subsystem for Linux";
39 homepage = "https://github.com/wslutilities/wslu";
40 changelog = "https://github.com/wslutilities/wslu/releases/tag/v${finalAttrs.version}";
41 license = lib.licenses.gpl3Plus;
42 maintainers = with lib.maintainers; [ jamiemagee ];
43 platforms = lib.platforms.linux;
44 };
45})