forked from mirrors/nixpkgs
thefuck: init at 3.18 (#26529)
This commit is contained in:
parent
9cad7076d1
commit
3803864ca6
|
@ -99,6 +99,7 @@
|
|||
./programs/spacefm.nix
|
||||
./programs/ssh.nix
|
||||
./programs/ssmtp.nix
|
||||
./programs/thefuck.nix
|
||||
./programs/tmux.nix
|
||||
./programs/venus.nix
|
||||
./programs/vim.nix
|
||||
|
|
31
nixos/modules/programs/thefuck.nix
Normal file
31
nixos/modules/programs/thefuck.nix
Normal file
|
@ -0,0 +1,31 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.programs.thefuck;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
programs.thefuck = {
|
||||
enable = mkEnableOption "thefuck";
|
||||
|
||||
alias = mkOption {
|
||||
default = "fuck";
|
||||
type = types.string;
|
||||
|
||||
description = ''
|
||||
`thefuck` needs an alias to be configured.
|
||||
The default value is `fuck`, but you can use anything else as well.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [ thefuck ];
|
||||
environment.shellInit = ''
|
||||
eval $(${pkgs.thefuck}/bin/thefuck --alias ${cfg.alias})
|
||||
'';
|
||||
};
|
||||
}
|
27
pkgs/tools/misc/thefuck/default.nix
Normal file
27
pkgs/tools/misc/thefuck/default.nix
Normal file
|
@ -0,0 +1,27 @@
|
|||
{ fetchurl, stdenv, pkgs, ... }:
|
||||
|
||||
pkgs.pythonPackages.buildPythonPackage rec {
|
||||
name = "${pname}-${version}";
|
||||
pname = "thefuck";
|
||||
version = "3.18";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/nvbn/${pname}/archive/${version}.tar.gz";
|
||||
sha256 = "1xsvkqh89rgxq5w03mnlcfkn9y39nfwhb2pjabjspcc2mi2mq5y6";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = with pkgs.pythonPackages; [
|
||||
psutil
|
||||
colorama
|
||||
six
|
||||
decorator
|
||||
pathlib2
|
||||
];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = "https://github.com/nvbn/thefuck";
|
||||
description = "Magnificent app which corrects your previous console command.";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ ma27 ];
|
||||
};
|
||||
}
|
|
@ -4342,6 +4342,8 @@ with pkgs;
|
|||
|
||||
thc-hydra = callPackage ../tools/security/thc-hydra { };
|
||||
|
||||
thefuck = callPackage ../tools/misc/thefuck { };
|
||||
|
||||
thin-provisioning-tools = callPackage ../tools/misc/thin-provisioning-tools { };
|
||||
|
||||
tiled = libsForQt5.callPackage ../applications/editors/tiled { };
|
||||
|
|
Loading…
Reference in a new issue