aboutsummaryrefslogtreecommitdiffstats
path: root/atuin.nix
diff options
context:
space:
mode:
authorPatrick Jackson <patrick@jackson.dev>2023-03-31 01:58:57 -0600
committerGitHub <noreply@github.com>2023-03-31 08:58:57 +0100
commit662f2b84fd7cd5b815597fd0e013ef8292a48ae6 (patch)
tree28238f9dd487dad47c152e9731cca13001324bb4 /atuin.nix
parentAdd `atuin status` (#830) (diff)
downloadatuin-662f2b84fd7cd5b815597fd0e013ef8292a48ae6.zip
fix: allow nix package to fetch dependencies from git (#832)
This change saves us from needing to keep a copy of the checksum in atuin.nix, so that Cargo.lock can remain as the sole source of truth for the dependency versions.
Diffstat (limited to 'atuin.nix')
-rw-r--r--atuin.nix15
1 files changed, 12 insertions, 3 deletions
diff --git a/atuin.nix b/atuin.nix
index 606e6875..262f5701 100644
--- a/atuin.nix
+++ b/atuin.nix
@@ -1,19 +1,28 @@
+# Atuin package definition
+#
+# This file will be similar to the package definition in nixpkgs:
+# https://github.com/NixOS/nixpkgs/blob/master/pkgs/tools/misc/atuin/default.nix
+#
+# Helpful documentation: https://github.com/NixOS/nixpkgs/blob/master/doc/languages-frameworks/rust.section.md
{
lib,
stdenv,
- fetchFromGitHub,
installShellFiles,
rustPlatform,
libiconv,
Security,
SystemConfiguration,
}:
-rustPlatform.buildRustPackage rec {
+rustPlatform.buildRustPackage {
name = "atuin";
src = lib.cleanSource ./.;
- cargoLock.lockFile = ./Cargo.lock;
+ cargoLock = {
+ lockFile = ./Cargo.lock;
+ # Allow dependencies to be fetched from git and avoid having to set the outputHashes manually
+ allowBuiltinFetchGit = true;
+ };
nativeBuildInputs = [installShellFiles];