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:
parent
0d16a113c5
commit
662f2b84fd
1 changed files with 12 additions and 3 deletions
15
atuin.nix
15
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,
|
lib,
|
||||||
stdenv,
|
stdenv,
|
||||||
fetchFromGitHub,
|
|
||||||
installShellFiles,
|
installShellFiles,
|
||||||
rustPlatform,
|
rustPlatform,
|
||||||
libiconv,
|
libiconv,
|
||||||
Security,
|
Security,
|
||||||
SystemConfiguration,
|
SystemConfiguration,
|
||||||
}:
|
}:
|
||||||
rustPlatform.buildRustPackage rec {
|
rustPlatform.buildRustPackage {
|
||||||
name = "atuin";
|
name = "atuin";
|
||||||
|
|
||||||
src = lib.cleanSource ./.;
|
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];
|
nativeBuildInputs = [installShellFiles];
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue