-
-
Notifications
You must be signed in to change notification settings - Fork 508
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add nix files and install instructions
- Loading branch information
1 parent
ee89129
commit d2ac2df
Showing
5 changed files
with
124 additions
and
0 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 |
---|---|---|
|
@@ -3,3 +3,4 @@ | |
.env | ||
.idea/ | ||
.vscode/ | ||
result |
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
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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ | ||
lib, | ||
stdenv, | ||
fetchFromGitHub, | ||
installShellFiles, | ||
rustPlatform, | ||
libiconv, | ||
Security, | ||
SystemConfiguration, | ||
}: | ||
rustPlatform.buildRustPackage rec { | ||
name = "atuin"; | ||
|
||
src = lib.cleanSource ./.; | ||
|
||
cargoLock.lockFile = ./Cargo.lock; | ||
|
||
nativeBuildInputs = [installShellFiles]; | ||
|
||
buildInputs = lib.optionals stdenv.isDarwin [libiconv Security SystemConfiguration]; | ||
|
||
postInstall = '' | ||
installShellCompletion --cmd atuin \ | ||
--bash <($out/bin/atuin gen-completions -s bash) \ | ||
--fish <($out/bin/atuin gen-completions -s fish) \ | ||
--zsh <($out/bin/atuin gen-completions -s zsh) | ||
''; | ||
|
||
meta = with lib; { | ||
description = "Replacement for a shell history which records additional commands context with optional encrypted synchronization between machines"; | ||
homepage = "https://github.com/ellie/atuin"; | ||
license = licenses.mit; | ||
}; | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
inputs = { | ||
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; | ||
flake-utils.url = "github:numtide/flake-utils"; | ||
}; | ||
outputs = { | ||
self, | ||
nixpkgs, | ||
flake-utils, | ||
... | ||
}: | ||
flake-utils.lib.eachDefaultSystem (system: let | ||
pkgs = nixpkgs.outputs.legacyPackages.${system}; | ||
in { | ||
packages.atuin = pkgs.callPackage ./atuin.nix { | ||
inherit (pkgs.darwin.frameworks) Security SystemConfiguration; | ||
}; | ||
packages.default = self.outputs.packages.${system}.atuin; | ||
|
||
devShells.default = self.packages.${system}.default.overrideAttrs (super: { | ||
nativeBuildInputs = with pkgs; | ||
super.nativeBuildInputs | ||
++ [ | ||
cargo-edit | ||
clippy | ||
rustfmt | ||
]; | ||
RUST_SRC_PATH = "${pkgs.rustPlatform.rustLibSrc}"; | ||
}); | ||
}); | ||
} |