Unverified Commit 13481954 authored by Olivia Crain's avatar Olivia Crain
Browse files

tests.importCargoLock: fix self-inclusive src listings in .nix files

Replace `src = ./.` instances with more explicit source listings.
Otherwise, derivations will be rebuilt on any change to the files
defining them (e.g. formatting via nixfmt-rfc-style).
parent c1f239fa
Loading
Loading
Loading
Loading
+12 −3
Original line number Diff line number Diff line
{ rustPlatform }:

{ lib, rustPlatform }:
let
  fs = lib.fileset;
in
rustPlatform.buildRustPackage {
  pname = "basic-dynamic";
  version = "0.1.0";

  src = ./.;
  src = fs.toSource {
    root = ./.;
    fileset = fs.unions [
      ./Cargo.toml
      ./Cargo.lock
      ./src
    ];
  };

  cargoLock.lockFileContents = builtins.readFile ./Cargo.lock;

+12 −3
Original line number Diff line number Diff line
{ rustPlatform }:

{ lib, rustPlatform }:
let
  fs = lib.fileset;
in
rustPlatform.buildRustPackage {
  pname = "basic";
  version = "0.1.0";

  src = ./.;
  src = fs.toSource {
    root = ./.;
    fileset = fs.unions [
      ./Cargo.toml
      ./Cargo.lock
      ./src
    ];
  };

  cargoLock = {
    lockFile = ./Cargo.lock;
+12 −3
Original line number Diff line number Diff line
{ rustPlatform }:

{ lib, rustPlatform }:
let
  fs = lib.fileset;
in
rustPlatform.buildRustPackage {
  pname = "git-dependency-branch";
  version = "0.1.0";

  src = ./.;
  src = fs.toSource {
    root = ./.;
    fileset = fs.unions [
      ./Cargo.toml
      ./Cargo.lock
      ./src
    ];
  };

  cargoLock = {
    lockFile = ./Cargo.lock;
+11 −2
Original line number Diff line number Diff line
{ rustPlatform, pkg-config, openssl, lib, darwin, stdenv }:

let
  fs = lib.fileset;
in
rustPlatform.buildRustPackage {
  pname = "git-dependency-rev-non-workspace-nested-crate";
  version = "0.1.0";

  src = ./.;
  src = fs.toSource {
    root = ./.;
    fileset = fs.unions [
      ./Cargo.toml
      ./Cargo.lock
      ./src
    ];
  };

  nativeBuildInputs = [
    pkg-config
+12 −3
Original line number Diff line number Diff line
{ rustPlatform }:

{ lib, rustPlatform }:
let
  fs = lib.fileset;
in
rustPlatform.buildRustPackage {
  pname = "git-dependency-rev";
  version = "0.1.0";

  src = ./.;
  src = fs.toSource {
    root = ./.;
    fileset = fs.unions [
      ./Cargo.toml
      ./Cargo.lock
      ./src
    ];
  };

  cargoLock = {
    lockFile = ./Cargo.lock;
Loading