From e4fd4b2a71bca8bf5d682399b238d192dd4ee6b7 Mon Sep 17 00:00:00 2001 From: Yannick Markus Date: Wed, 17 Jun 2020 10:34:09 +0200 Subject: [PATCH] devdocs-desktop: init at 0.7.1 Also added ymarkus to maintainers list. --- maintainers/maintainer-list.nix | 6 +++ .../misc/devdocs-desktop/default.nix | 43 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 3 files changed, 51 insertions(+) create mode 100644 pkgs/applications/misc/devdocs-desktop/default.nix diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index cb3a7ee592b0..47ef2cc1f6ce 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -8915,6 +8915,12 @@ githubId = 474343; name = "Xavier Zwirtz"; }; + ymarkus = { + name = "Yannick Markus"; + email = "nixpkgs@ymarkus.dev"; + github = "ymarkus"; + githubId = 62380378; + }; ymeister = { name = "Yuri Meister"; email = "47071325+ymeister@users.noreply.github.com"; diff --git a/pkgs/applications/misc/devdocs-desktop/default.nix b/pkgs/applications/misc/devdocs-desktop/default.nix new file mode 100644 index 000000000000..7c1726961339 --- /dev/null +++ b/pkgs/applications/misc/devdocs-desktop/default.nix @@ -0,0 +1,43 @@ +{ stdenv, appimageTools, fetchurl, gsettings-desktop-schemas, gtk3 }: + +let + version = "0.7.1"; + pname = "devdocs-desktop"; + name = "${pname}-${version}"; + + src = fetchurl { + url = "https://github.com/egoist/devdocs-desktop/releases/download/v${version}/DevDocs-${version}.AppImage"; + sha256 = "5bba99a34c90a65eff67aface0b7446cbf43d620a1c195f27e7bb33ab6d3d0c2"; + }; + + appimageContents = appimageTools.extractType2 { + inherit name src; + }; + +in appimageTools.wrapType2 rec { + inherit name src; + + profile = '' + export XDG_DATA_DIRS=${gsettings-desktop-schemas}/share/gsettings-schemas/${gsettings-desktop-schemas.name}:${gtk3}/share/gsettings-schemas/${gtk3.name}:$XDG_DATA_DIRS + ''; + + extraInstallCommands = '' + mv $out/bin/${name} $out/bin/${pname} + install -m 444 -D ${appimageContents}/devdocs.desktop $out/share/applications/devdocs.desktop + install -m 444 -D ${appimageContents}/devdocs.png $out/share/icons/hicolor/0x0/apps/devdocs.png + substituteInPlace $out/share/applications/devdocs.desktop \ + --replace 'Exec=AppRun' 'Exec=${pname}' + ''; + + meta = with stdenv.lib; { + description = "A full-featured desktop app for DevDocs.io"; + longDescription = '' + DevDocs.io combines multiple API documentations in a fast, organized, and searchable interface. This is an unofficial desktop app for it. + ''; + homepage = "https://github.com/egoist/devdocs-desktop"; + downloadPage = "https://github.com/egoist/devdocs-desktop/releases"; + license = licenses.mit; + maintainers = with maintainers; [ ymarkus ]; + platforms = [ "x86_64-linux" ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 18c9cf0165bc..c161f34e175d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1656,6 +1656,8 @@ in desync = callPackage ../applications/networking/sync/desync { }; + devdocs-desktop = callPackage ../applications/misc/devdocs-desktop { }; + devmem2 = callPackage ../os-specific/linux/devmem2 { }; dbus-broker = callPackage ../os-specific/linux/dbus-broker { };