nixpkgs/pkgs/desktops/pantheon/apps/elementary-files/default.nix
Profpatsch 4a7f99d55d treewide: with stdenv.lib; in meta -> with lib;
Part of: https://github.com/NixOS/nixpkgs/issues/108938

meta = with stdenv.lib;

is a widely used pattern. We want to slowly remove
the `stdenv.lib` indirection and encourage people
to use `lib` directly. Thus let’s start with the meta
field.

This used a rewriting script to mostly automatically
replace all occurances of this pattern, and add the
`lib` argument to the package header if it doesn’t
exist yet.

The script in its current form is available at
https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
2021-01-11 10:38:22 +01:00

103 lines
1.7 KiB
Nix

{ lib, stdenv
, fetchFromGitHub
, nix-update-script
, pantheon
, pkgconfig
, meson
, ninja
, gettext
, vala
, python3
, desktop-file-utils
, libcanberra
, gtk3
, glib
, libgee
, granite
, libnotify
, libunity
, pango
, elementary-dock
, bamf
, sqlite
, libdbusmenu-gtk3
, zeitgeist
, glib-networking
, elementary-icon-theme
, libcloudproviders
, libgit2-glib
, wrapGAppsHook
}:
stdenv.mkDerivation rec {
pname = "elementary-files";
version = "4.5.0";
repoName = "files";
outputs = [ "out" "dev" ];
src = fetchFromGitHub {
owner = "elementary";
repo = repoName;
rev = version;
sha256 = "sha256-wtQW1poX791DAlSFdVV9psnCfBDeVXI2fDZ2GcvvNn8=";
};
passthru = {
updateScript = nix-update-script {
attrPath = "pantheon.${pname}";
};
};
nativeBuildInputs = [
desktop-file-utils
gettext
glib-networking
meson
ninja
pkgconfig
python3
vala
wrapGAppsHook
];
buildInputs = [
bamf
elementary-dock
elementary-icon-theme
granite
gtk3
libcanberra
libcloudproviders
libdbusmenu-gtk3
libgee
libgit2-glib
libnotify
libunity
pango
sqlite
zeitgeist
];
patches = [
./0001-filechooser-module-hardcode-gsettings-for-nixos.patch
];
postPatch = ''
chmod +x meson/post_install.py
patchShebangs meson/post_install.py
substituteInPlace filechooser-module/FileChooserDialog.vala \
--subst-var-by ELEMENTARY_FILES_GSETTINGS_PATH ${glib.makeSchemaPath "$out" "${pname}-${version}"}
'';
meta = with lib; {
description = "File browser designed for elementary OS";
homepage = "https://github.com/elementary/files";
license = licenses.lgpl3;
platforms = platforms.linux;
maintainers = pantheon.maintainers;
};
}