Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libfm: use finalAttrs pattern and remove with lib; #371519

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions pkgs/by-name/li/libfm/0001-fm-load-all-actions.patch

This file was deleted.

11 changes: 0 additions & 11 deletions pkgs/by-name/li/libfm/0002-exo-icon-view-key-press-event.patch

This file was deleted.

11 changes: 0 additions & 11 deletions pkgs/by-name/li/libfm/0003-ask-action-on-drop.patch

This file was deleted.

11 changes: 0 additions & 11 deletions pkgs/by-name/li/libfm/0004-create-icon-view.patch

This file was deleted.

29 changes: 18 additions & 11 deletions pkgs/by-name/li/libfm/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
lib,
stdenv,
fetchurl,
fetchpatch,
glib,
intltool,
menu-cache,
Expand All @@ -18,20 +19,21 @@ let
gtk = if withGtk3 then gtk3 else gtk2;
inherit (lib) optional optionalString;
in
stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = if extraOnly then "libfm-extra" else "libfm";
version = "1.3.2";

src = fetchurl {
url = "mirror://sourceforge/pcmanfm/libfm-${version}.tar.xz";
url = "mirror://sourceforge/pcmanfm/libfm-${finalAttrs.version}.tar.xz";
sha256 = "sha256-pQQmMDBM+OXYz/nVZca9VG8ii0jJYBU+02ajTofK0eU=";
};

patches = [
./0001-fm-load-all-actions.patch
jtojnar marked this conversation as resolved.
Show resolved Hide resolved
./0002-exo-icon-view-key-press-event.patch
./0003-ask-action-on-drop.patch
./0004-create-icon-view.patch
# Add casts to fix -Werror=incompatible-pointer-types
(fetchpatch {
url = "https://github.com/lxde/libfm/commit/fbcd183335729fa3e8dd6a837c13a23ff3271000.patch";
hash = "sha256-RbX8jkP/5ao6NWEnv8Pgy4zwZaiDsslGlRRWdoV3enA=";
})
];

nativeBuildInputs = [
Expand All @@ -52,19 +54,24 @@ stdenv.mkDerivation rec {

installFlags = [ "sysconfdir=${placeholder "out"}/etc" ];

postPatch = ''
# Ensure the files are re-generated from Vala sources.
rm src/actions/*.c
'';

# libfm-extra is pulled in by menu-cache and thus leads to a collision for libfm
postInstall = optionalString (!extraOnly) ''
rm $out/lib/libfm-extra.so $out/lib/libfm-extra.so.* $out/lib/libfm-extra.la $out/lib/pkgconfig/libfm-extra.pc
'';

enableParallelBuilding = true;

meta = with lib; {
meta = {
broken = stdenv.hostPlatform.isDarwin;
homepage = "https://blog.lxde.org/category/pcmanfm/";
license = licenses.lgpl21Plus;
license = lib.licenses.lgpl21Plus;
description = "Glib-based library for file management";
maintainers = [ maintainers.ttuegel ];
platforms = platforms.linux ++ platforms.darwin;
maintainers = with lib.maintainers; [ ttuegel ];
platforms = lib.platforms.linux ++ lib.platforms.darwin;
};
}
})