tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
0
fork
atom
lol
0
fork
atom
overview
issues
pulls
pipelines
i810switch: modernize
Moraxyc
1 year ago
39a2802a
9469c20c
+28
-14
1 changed file
expand all
collapse all
unified
split
pkgs
by-name
i8
i810switch
package.nix
+28
-14
pkgs/by-name/i8/i810switch/package.nix
···
2
lib,
3
stdenv,
4
fetchurl,
0
5
pciutils,
6
}:
7
8
-
stdenv.mkDerivation {
9
pname = "i810switch";
10
version = "0.6.5";
11
12
-
installPhase = "
13
-
sed -i -e 's+/usr++' Makefile
14
-
sed -i -e 's+^\\(.*putenv(\"PATH=\\).*$+\\1${pciutils}/sbin\");+' i810switch.c
15
-
make clean
16
-
make install DESTDIR=\${out}
17
-
";
18
-
19
src = fetchurl {
20
-
url = "http://www16.plala.or.jp/mano-a-mano/i810switch/i810switch-0.6.5.tar.gz";
21
-
sha256 = "d714840e3b14e1fa9c432c4be0044b7c008d904dece0d611554655b979cad4c3";
22
};
23
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
24
# Ignore errors since gcc-14.
25
# i810switch.c:251:34: error: passing argument 2 of 'getline' from incompatible pointer type [-Wincompatible-pointer-types]
26
# i810switch.c:296:34: error: passing argument 2 of 'getline' from incompatible pointer type [-Wincompatible-pointer-types]
27
env.NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-pointer-types";
28
29
-
meta = with lib; {
30
description = "Utility for switching between the LCD and external VGA display on Intel graphics cards";
31
homepage = "http://www16.plala.or.jp/mano-a-mano/i810switch.html";
32
maintainers = [ ];
33
-
license = licenses.gpl2Only;
34
-
platforms = platforms.linux;
0
35
};
36
-
}
···
2
lib,
3
stdenv,
4
fetchurl,
5
+
installShellFiles,
6
pciutils,
7
}:
8
9
+
stdenv.mkDerivation (finalAttrs: {
10
pname = "i810switch";
11
version = "0.6.5";
12
0
0
0
0
0
0
0
13
src = fetchurl {
14
+
url = "http://www16.plala.or.jp/mano-a-mano/i810switch/i810switch-${finalAttrs.version}.tar.gz";
15
+
hash = "sha256-1xSEDjsU4fqcQyxL4ARLfACNkE3s4NYRVUZVuXnK1MM=";
16
};
17
18
+
nativeBuildInputs = [ installShellFiles ];
19
+
20
+
preBuild = ''
21
+
make clean
22
+
23
+
substituteInPlace i810switch.c \
24
+
--replace-fail 'define CMD_LSPCI "lspci"' 'define CMD_LSPCI "${lib.getExe' pciutils "lspci"}"'
25
+
'';
26
+
27
+
installPhase = "
28
+
runHook preInstall
29
+
30
+
install -Dm755 -t $out/bin i810switch i810rotate
31
+
32
+
installManPage i810switch.1.gz i810rotate.1.gz
33
+
34
+
runHook postInstall
35
+
";
36
+
37
# Ignore errors since gcc-14.
38
# i810switch.c:251:34: error: passing argument 2 of 'getline' from incompatible pointer type [-Wincompatible-pointer-types]
39
# i810switch.c:296:34: error: passing argument 2 of 'getline' from incompatible pointer type [-Wincompatible-pointer-types]
40
env.NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-pointer-types";
41
42
+
meta = {
43
description = "Utility for switching between the LCD and external VGA display on Intel graphics cards";
44
homepage = "http://www16.plala.or.jp/mano-a-mano/i810switch.html";
45
maintainers = [ ];
46
+
license = lib.licenses.gpl2Only;
47
+
platforms = lib.platforms.linux;
48
+
mainProgram = "i810switch";
49
};
50
+
})