forked from NixOS/nixpkgs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request NixOS#142093 from cab404/swaycwd-0.0.2
swaycwd: 0.0.1 -> 0.0.2
- Loading branch information
Showing
1 changed file
with
30 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,38 @@ | ||
{ lib, nimPackages, fetchFromGitLab | ||
{ lib | ||
, nimPackages | ||
, fetchFromGitLab | ||
, enableShells ? [ "bash" "zsh" "fish" "sh" "posh" ] | ||
}: | ||
nimPackages.buildNimPackage rec{ | ||
|
||
nimPackages.buildNimPackage { | ||
name = "swaycwd"; | ||
version = "0.0.1"; | ||
name = "swaycwd"; | ||
version = "0.0.2"; | ||
|
||
src = fetchFromGitLab { | ||
owner = "cab404"; | ||
repo = "swaycwd"; | ||
rev = "aca81695ec2102b9bca6f5bae364f69a8b9d399f"; | ||
hash = "sha256-MkyY3wWByQo0l0J28xKDfGtxfazVPRyZHCObl9Fszh4="; | ||
}; | ||
src = fetchFromGitLab { | ||
owner = "cab404"; | ||
repo = name; | ||
rev = "v${version}"; | ||
hash = "sha256-OZWOPtOqcX+fVQCxWntrn98EzFu70WH55rfYCPDMSKk="; | ||
}; | ||
|
||
preConfigure = '' | ||
{ | ||
echo 'let enabledShells: seq[string] = @${builtins.toJSON enableShells}' | ||
echo 'export enabledShells' | ||
} > shells.nim | ||
cat << EOF > swaycwd.nimble | ||
srcDir = "." | ||
bin = "swaycwd" | ||
EOF | ||
''; | ||
preConfigure = '' | ||
{ | ||
echo 'let enabledShells: seq[string] = @${builtins.toJSON enableShells}' | ||
echo 'export enabledShells' | ||
} > shells.nim | ||
cat << EOF > swaycwd.nimble | ||
srcDir = "." | ||
bin = "swaycwd" | ||
EOF | ||
''; | ||
|
||
nimFlags = [ "--opt:speed" ]; | ||
nimFlags = [ "--opt:speed" ]; | ||
|
||
meta = with lib; { | ||
homepage = "https://gitlab.com/cab404/swaycwd"; | ||
description = "Returns cwd for shell in currently focused sway window, or home directory if cannot find shell"; | ||
maintainers = with maintainers; [ cab404 ]; | ||
platforms = platforms.linux; | ||
license = licenses.gpl3Only; | ||
}; | ||
meta = with lib; { | ||
homepage = "https://gitlab.com/cab404/swaycwd"; | ||
description = "Returns cwd for shell in currently focused sway window, or home directory if cannot find shell"; | ||
maintainers = with maintainers; [ cab404 ]; | ||
platforms = platforms.linux; | ||
license = licenses.gpl3Only; | ||
}; | ||
} |