tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
spacefm: sudo and gksu fixes #15758 and license update
Ram Kromberg
9 years ago
1bbcd91b
1c0af407
+69
-6
3 changed files
expand all
collapse all
unified
split
nixos
modules
module-list.nix
programs
spacefm.nix
pkgs
applications
misc
spacefm
default.nix
+1
nixos/modules/module-list.nix
···
76
76
./programs/screen.nix
77
77
./programs/shadow.nix
78
78
./programs/shell.nix
79
79
+
./programs/spacefm.nix
79
80
./programs/ssh.nix
80
81
./programs/ssmtp.nix
81
82
./programs/tmux.nix
+55
nixos/modules/programs/spacefm.nix
···
1
1
+
# Global configuration for spacefm.
2
2
+
3
3
+
{ config, lib, pkgs, ... }:
4
4
+
5
5
+
with lib;
6
6
+
7
7
+
let cfg = config.programs.spacefm;
8
8
+
9
9
+
in
10
10
+
{
11
11
+
###### interface
12
12
+
13
13
+
options = {
14
14
+
15
15
+
programs.spacefm = {
16
16
+
17
17
+
enable = mkOption {
18
18
+
type = types.bool;
19
19
+
default = false;
20
20
+
description = ''
21
21
+
Whether to install SpaceFM and create <filename>/etc/spacefm/spacefm.conf<filename>.
22
22
+
'';
23
23
+
};
24
24
+
25
25
+
settings = mkOption {
26
26
+
type = types.attrs;
27
27
+
default = {
28
28
+
tmp_dir = "/tmp";
29
29
+
terminal_su = "${pkgs.sudo}/bin/sudo";
30
30
+
graphical_su = "${pkgs.gksu}/bin/gksu";
31
31
+
};
32
32
+
example = literalExample ''{
33
33
+
tmp_dir = "/tmp";
34
34
+
terminal_su = "''${pkgs.sudo}/bin/sudo";
35
35
+
graphical_su = "''${pkgs.gksu}/bin/gksu";
36
36
+
}'';
37
37
+
description = ''
38
38
+
The system-wide spacefm configuration.
39
39
+
Parameters to be written to <filename>/etc/spacefm/spacefm.conf</filename>.
40
40
+
Refer to the <link xlink:href="https://ignorantguru.github.io/spacefm/spacefm-manual-en.html#programfiles-etc">relevant entry</link> in the SpaceFM manual.
41
41
+
'';
42
42
+
};
43
43
+
44
44
+
};
45
45
+
};
46
46
+
47
47
+
###### implementation
48
48
+
49
49
+
config = mkIf cfg.enable {
50
50
+
environment.systemPackages = [ pkgs.spaceFM ];
51
51
+
52
52
+
environment.etc."spacefm/spacefm.conf".text =
53
53
+
concatStrings (mapAttrsToList (n: v: "${n}=${toString v}\n") cfg.settings);
54
54
+
};
55
55
+
}
+13
-6
pkgs/applications/misc/spacefm/default.nix
···
1
1
-
{ pkgs, fetchFromGitHub, stdenv, gtk3, udev, desktop_file_utils, shared_mime_info
2
2
-
, intltool, pkgconfig, wrapGAppsHook, ffmpegthumbnailer, jmtpfs, ifuse, lsof, udisks
3
3
-
, hicolor_icon_theme, adwaita-icon-theme }:
1
1
+
{ pkgs, fetchFromGitHub, stdenv, gtk3, udev, desktop_file_utils
2
2
+
, shared_mime_info, intltool, pkgconfig, wrapGAppsHook, ffmpegthumbnailer
3
3
+
, jmtpfs, ifuse, lsof, udisks, hicolor_icon_theme, adwaita-icon-theme }:
4
4
5
5
stdenv.mkDerivation rec {
6
6
name = "spacefm-${version}";
···
15
15
16
16
configureFlags = [
17
17
"--with-bash-path=${pkgs.bash}/bin/bash"
18
18
-
"--with-preferable-sudo=${pkgs.sudo}/bin/sudo"
19
18
];
20
19
21
20
preConfigure = ''
22
21
configureFlags="$configureFlags --sysconfdir=$out/etc"
23
22
'';
24
23
25
25
-
buildInputs = [ gtk3 udev desktop_file_utils shared_mime_info intltool pkgconfig wrapGAppsHook ffmpegthumbnailer jmtpfs ifuse lsof udisks ];
24
24
+
postInstall = ''
25
25
+
rm -f $out/etc/spacefm/spacefm.conf
26
26
+
ln -s /etc/spacefm/spacefm.conf $out/etc/spacefm/spacefm.conf
27
27
+
'';
28
28
+
29
29
+
buildInputs = [
30
30
+
gtk3 udev desktop_file_utils shared_mime_info intltool pkgconfig
31
31
+
wrapGAppsHook ffmpegthumbnailer jmtpfs ifuse lsof udisks
32
32
+
];
26
33
27
34
meta = with stdenv.lib; {
28
35
description = "A multi-panel tabbed file manager";
···
33
40
'';
34
41
homepage = http://ignorantguru.github.io/spacefm/;
35
42
platforms = platforms.linux;
36
36
-
license = licenses.gpl3;
43
43
+
license = licenses.gpl3Plus;
37
44
maintainers = with maintainers; [ jagajaga obadz ];
38
45
};
39
46
}