Refactor to only download displayselect
, not the
...whole repository
This commit is contained in:
parent
9fa76b531a
commit
56b5f099fc
2 changed files with 14 additions and 12 deletions
pkgs/displayselect
|
@ -1,28 +1,30 @@
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
|
|
||||||
with pkgs;
|
pkgs.stdenv.mkDerivation {
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
|
||||||
pname = "displayselect";
|
pname = "displayselect";
|
||||||
version = "unstable-2024-05-11";
|
version = "unstable-2024-05-11";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = builtins.fetchurl {
|
||||||
owner = "lukesmithxyz";
|
url = "https://raw.githubusercontent.com/lukesmithxyz/voidrice/97687287bdfd332398b82a196b5f1feaec73f1d7/.local/bin/displayselect";
|
||||||
repo = "voidrice";
|
sha256 = "sha256:11r561pfhb48a3xmi42zzvpljahnwlfad9rz8qmmp64dhz1f2vp0";
|
||||||
rev = "97687287bdfd332398b82a196b5f1feaec73f1d7";
|
|
||||||
sha256 = "sha256-9U1Do0w2oT5E6uZxSKoHAzbGbSLQRQlT65KcPGzwhW8=";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [
|
dontUnpack = true;
|
||||||
|
|
||||||
|
buildInputs = with pkgs; [
|
||||||
bash
|
bash
|
||||||
xorg.xrandr
|
xorg.xrandr
|
||||||
];
|
];
|
||||||
|
|
||||||
|
prePatch = ''
|
||||||
|
cp $src displayselect
|
||||||
|
'';
|
||||||
|
|
||||||
patches = [ ./scaling.patch ];
|
patches = [ ./scaling.patch ];
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/bin
|
mkdir -p $out/bin
|
||||||
cp .local/bin/displayselect $out/bin
|
cp displayselect $out/bin
|
||||||
chmod +x $out/bin/displayselect
|
chmod +x $out/bin/displayselect
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
diff --git a/.local/bin/displayselect b/.local/bin/displayselect
|
diff --git a/.local/bin/displayselect b/.local/bin/displayselect
|
||||||
index 51dd468..c132b7a 100755
|
index 51dd468..c132b7a 100755
|
||||||
--- a/.local/bin/displayselect
|
--- a/displayselect
|
||||||
+++ b/.local/bin/displayselect
|
+++ b/displayselect
|
||||||
@@ -15,20 +15,13 @@ twoscreen() { # If multi-monitor is selected and there are two screens.
|
@@ -15,20 +15,13 @@ twoscreen() { # If multi-monitor is selected and there are two screens.
|
||||||
|
|
||||||
res_external=$(xrandr --query | sed -n "/^$external/,/\+/p" | \
|
res_external=$(xrandr --query | sed -n "/^$external/,/\+/p" | \
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue