mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-13 09:13:17 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
48 lines
1.2 KiB
Nix
48 lines
1.2 KiB
Nix
{ stdenv
|
|
, fetchFromGitHub
|
|
, libde265
|
|
}:
|
|
|
|
stdenv.mkDerivation {
|
|
pname = "libde265-test-corpus-decode";
|
|
version = "unstable-2020-02-19";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "strukturag";
|
|
repo = "libde265-data";
|
|
rev = "bdfdfdbe682f514c5185c270c74eac42731a7fa8";
|
|
sha256 = "sha256-fOgu7vMoyH30Zzbkfm4a6JVDZtYLO/0R2syC2Wux+Z8=";
|
|
};
|
|
|
|
dontConfigure = true;
|
|
dontBuild = true;
|
|
|
|
doCheck = true;
|
|
nativeCheckInputs = [ libde265 ];
|
|
# based on invocations in https://github.com/strukturag/libde265/blob/0b1752abff97cb542941d317a0d18aa50cb199b1/scripts/ci-run.sh
|
|
checkPhase = ''
|
|
echo "Single-threaded:"
|
|
find . -name '*.bin' | while read f; do
|
|
echo "Decoding $f"
|
|
dec265 -q -c $f
|
|
dec265 -0 -q -c $f
|
|
dec265 -q --disable-deblocking --disable-sao $f
|
|
done
|
|
echo "Multi-threaded:"
|
|
find RandomAccess/ -name '*.bin' | while read f; do
|
|
echo "Decoding $f"
|
|
dec265 -t 4 -q -c $f
|
|
dec265 -t 4 -0 -q -c $f
|
|
dec265 -t 4 -q --disable-deblocking --disable-sao $f
|
|
done
|
|
'';
|
|
# a larger corpus of files can be found
|
|
# as an ubuntu package libde265-teststreams @
|
|
# https://launchpad.net/~strukturag/+archive/ubuntu/libde265/+packages
|
|
# but it is *much* larger
|
|
|
|
installPhase = ''
|
|
touch $out
|
|
'';
|
|
}
|