Merge pull request #247578 from evils/grimshot
sway-contrib: switch source to new separate repo
This commit is contained in:
commit
2c24797158
1 changed files with 29 additions and 16 deletions
|
@ -1,5 +1,5 @@
|
|||
{ lib, stdenv
|
||||
|
||||
, fetchFromGitHub
|
||||
, coreutils
|
||||
, makeWrapper
|
||||
, sway-unwrapped
|
||||
|
@ -14,13 +14,27 @@
|
|||
, python3Packages
|
||||
}:
|
||||
|
||||
let
|
||||
version = "unstable-2023-06-30";
|
||||
src = fetchFromGitHub {
|
||||
owner = "OctopusET";
|
||||
repo = "sway-contrib";
|
||||
rev = "7e138bfc112872b79ac9fd766bc57c0f125b96d4";
|
||||
hash = "sha256-u4sw1NeAhl4FJCG2YOeY45SHoN7tw6cSJwEL5iqr0uQ=";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/OctopusET/sway-contrib";
|
||||
license = licenses.mit;
|
||||
platforms = platforms.all;
|
||||
};
|
||||
in
|
||||
{
|
||||
|
||||
grimshot = stdenv.mkDerivation rec {
|
||||
pname = "grimshot";
|
||||
version = sway-unwrapped.version;
|
||||
inherit version src;
|
||||
|
||||
src = sway-unwrapped.src;
|
||||
pname = "grimshot";
|
||||
|
||||
dontBuild = true;
|
||||
dontConfigure = true;
|
||||
|
@ -31,9 +45,9 @@ grimshot = stdenv.mkDerivation rec {
|
|||
nativeBuildInputs = [ makeWrapper installShellFiles ];
|
||||
buildInputs = [ bash ];
|
||||
installPhase = ''
|
||||
installManPage contrib/grimshot.1
|
||||
installManPage grimshot.1
|
||||
|
||||
install -Dm 0755 contrib/grimshot $out/bin/grimshot
|
||||
install -Dm 0755 grimshot $out/bin/grimshot
|
||||
wrapProgram $out/bin/grimshot --set PATH \
|
||||
"${lib.makeBinPath [
|
||||
sway-unwrapped
|
||||
|
@ -58,21 +72,17 @@ grimshot = stdenv.mkDerivation rec {
|
|||
|
||||
meta = with lib; {
|
||||
description = "A helper for screenshots within sway";
|
||||
homepage = "https://github.com/swaywm/sway/tree/master/contrib";
|
||||
license = licenses.mit;
|
||||
platforms = platforms.all;
|
||||
maintainers = sway-unwrapped.meta.maintainers ++ (with maintainers; [ evils ]);
|
||||
maintainers = with maintainers; [ evils ];
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
inactive-windows-transparency = python3Packages.buildPythonApplication rec {
|
||||
inherit version src;
|
||||
|
||||
# long name is long
|
||||
lname = "inactive-windows-transparency";
|
||||
pname = "sway-${lname}";
|
||||
version = sway-unwrapped.version;
|
||||
|
||||
src = sway-unwrapped.src;
|
||||
|
||||
format = "other";
|
||||
dontBuild = true;
|
||||
|
@ -81,12 +91,15 @@ inactive-windows-transparency = python3Packages.buildPythonApplication rec {
|
|||
propagatedBuildInputs = [ python3Packages.i3ipc ];
|
||||
|
||||
installPhase = ''
|
||||
install -Dm 0755 $src/contrib/${lname}.py $out/bin/${lname}.py
|
||||
install -Dm 0755 $src/${lname}.py $out/bin/${lname}.py
|
||||
'';
|
||||
|
||||
meta = sway-unwrapped.meta // {
|
||||
meta = with lib; {
|
||||
description = "It makes inactive sway windows transparent";
|
||||
homepage = "https://github.com/swaywm/sway/tree/${sway-unwrapped.version}/contrib";
|
||||
mainProgram = "${lname}.py";
|
||||
maintainers = with maintainers; [
|
||||
evils # packaged this as a side-effect of grimshot but doesn't use it
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue