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.
This commit is contained in:
Patrick Jackson 2023-03-31 01:58:57 -06:00 committed by GitHub
parent 0d16a113c5
commit 662f2b84fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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];