mirror of
https://github.com/NotAShelf/nyxexprs.git
synced 2024-11-22 13:20:44 +00:00
pkgs/alejandra-remove-ads: init at 3.0.0
This commit is contained in:
parent
0adc101c27
commit
43b19c1639
3 changed files with 50 additions and 2 deletions
|
@ -8,6 +8,7 @@ There are several packages exposed by this flake. Each directory in `pkgs` conta
|
|||
|
||||
| Package | Description |
|
||||
| :----------------- | :------------------------------------------------------------------------------------------------: |
|
||||
| alejandra-no-ads | A patched version of the **Alejandra** Nix formatter, without the pesky ads. |
|
||||
| ani-cli | An up-to-date, auto updated version of ani-cli |
|
||||
| cloneit | A CLI tool to download specific GitHub directories or files |
|
||||
| foot-transparent | A patched version of the foot terminal emulator that brings back fullscreen transparency[^1] |
|
||||
|
|
43
patches/0003-alejandra-remove-ads.patch
Normal file
43
patches/0003-alejandra-remove-ads.patch
Normal file
|
@ -0,0 +1,43 @@
|
|||
diff --git a/src/alejandra_cli/src/cli.rs b/src/alejandra_cli/src/cli.rs
|
||||
index bab102c..b90bf1d 100644
|
||||
--- a/src/alejandra_cli/src/cli.rs
|
||||
+++ b/src/alejandra_cli/src/cli.rs
|
||||
@@ -7,7 +7,6 @@ use futures::future::RemoteHandle;
|
||||
use futures::stream::FuturesUnordered;
|
||||
use futures::task::SpawnExt;
|
||||
|
||||
-use crate::ads::random_ad;
|
||||
use crate::verbosity::Verbosity;
|
||||
|
||||
/// The Uncompromising Nix Code Formatter.
|
||||
@@ -203,11 +202,6 @@ pub fn main() -> std::io::Result<()> {
|
||||
(true, false) => "requires formatting",
|
||||
}
|
||||
);
|
||||
-
|
||||
- if in_place {
|
||||
- eprintln!();
|
||||
- eprint!("{}", random_ad());
|
||||
- }
|
||||
}
|
||||
|
||||
std::process::exit(if in_place { 0 } else { 2 });
|
||||
@@ -218,8 +212,6 @@ pub fn main() -> std::io::Result<()> {
|
||||
eprintln!(
|
||||
"Congratulations! Your code complies with the Alejandra style."
|
||||
);
|
||||
- eprintln!();
|
||||
- eprint!("{}", random_ad());
|
||||
}
|
||||
|
||||
std::process::exit(0);
|
||||
diff --git a/src/alejandra_cli/src/lib.rs b/src/alejandra_cli/src/lib.rs
|
||||
index fd49ce8..258f656 100644
|
||||
--- a/src/alejandra_cli/src/lib.rs
|
||||
+++ b/src/alejandra_cli/src/lib.rs
|
||||
@@ -1,4 +1,3 @@
|
||||
-mod ads;
|
||||
pub mod cli;
|
||||
mod find;
|
||||
mod verbosity;
|
||||
|
|
@ -19,7 +19,7 @@
|
|||
};
|
||||
|
||||
packages = let
|
||||
inherit (pkgs) callPackage foot;
|
||||
inherit (pkgs) callPackage foot alejandra;
|
||||
|
||||
pins = import ../npins;
|
||||
mkPackage = path: {__functor = self: self.override;} // (callPackage path {inherit pins;});
|
||||
|
@ -44,8 +44,12 @@
|
|||
# patched packages
|
||||
foot-transparent = foot.overrideAttrs (prev: {
|
||||
mesonFlags = prev.mesonFlags ++ ["-Dfullscreen_alpha=true"];
|
||||
mainProgram = "foot";
|
||||
patches = (prev.patches or []) ++ [../patches/0001-foot-transparent.patch];
|
||||
mainProgram = "foot";
|
||||
});
|
||||
|
||||
alejandra-no-ads = alejandra.overrideAttrs (prev: {
|
||||
patches = (prev.patches or []) ++ [../patches/0003-alejandra-remove-ads.patch];
|
||||
});
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue