nixpkgs/pkgs/applications/virtualization/railcar/default.nix
Benjamin Hipple ad30a30488 rustPlatform.fetchCargo: handle custom Cargo.lock patchfiles with validation
Previously, we would asssert that the lockfiles are consistent during the
unpackPhase, but if the pkg has a patch for the lockfile itself then we must
wait until the patchPhase is complete to check.

This also removes an implicity dependency on the src attribute coming from
`fetchzip` / `fetchFromGitHub`, which happens to name the source directory
"source". Now we glob for it, so different fetchers will work consistently.
2020-02-28 18:54:23 -08:00

28 lines
810 B
Nix

{ lib, fetchFromGitHub, rustPlatform, libseccomp }:
rustPlatform.buildRustPackage rec {
pname = "railcar";
version = "1.0.4";
src = fetchFromGitHub {
owner = "oracle";
repo = "railcar";
rev = "v${version}";
sha256 = "09zn160qxd7760ii6rs5nhr00qmaz49x1plclscznxh9hinyjyh9";
};
# Submitted upstream https://github.com/oracle/railcar/pull/44
cargoPatches = [ ./cargo-lock.patch ];
cargoSha256 = "10qxkxpdprl2rcgy52s3q5gyg3i75qmx68rpl7cx1bgjzppfn9c3";
buildInputs = [ libseccomp ];
meta = with lib; {
description = "Rust implementation of the Open Containers Initiative oci-runtime";
homepage = https://github.com/oracle/railcar;
license = with licenses; [ asl20 /* or */ upl ];
maintainers = [ maintainers.spacekookie ];
platforms = platforms.all;
};
}