mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-16 09:54:52 +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.0 KiB
Nix
48 lines
1.0 KiB
Nix
{ lib
|
|
, buildGoModule
|
|
, fetchFromGitHub
|
|
, yuicompressor
|
|
, zopfli
|
|
, stdenv
|
|
}:
|
|
buildGoModule {
|
|
pname = "dcs";
|
|
version = "unstable-2021-04-07";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "Debian";
|
|
repo = "dcs";
|
|
rev = "da46accc4d55e9bfde1a6852ac5a9e730fcbbb2c";
|
|
hash = "sha256-N+6BXlKn1YTlh0ZdPNWa0nuJNcQtlUIc9TocM8cbzQk=";
|
|
};
|
|
|
|
vendorHash = "sha256-l2mziuisx0HzuP88rS5M+Wha6lu8P036wJYZlmzjWfs=";
|
|
|
|
# Depends on dcs binaries
|
|
doCheck = false;
|
|
|
|
nativeBuildInputs = [
|
|
yuicompressor
|
|
zopfli
|
|
];
|
|
|
|
postBuild = ''
|
|
make -C static -j$NIX_BUILD_CORES
|
|
'';
|
|
|
|
postInstall = ''
|
|
mkdir -p $out/share/dcs
|
|
cp -r cmd/dcs-web/templates $out/share/dcs
|
|
cp -r static $out/share/dcs
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Debian Code Search";
|
|
homepage = "https://github.com/Debian/dcs";
|
|
license = licenses.bsd3;
|
|
maintainers = [ ];
|
|
broken = stdenv.hostPlatform.isAarch64
|
|
|| stdenv.hostPlatform.isDarwin; # never built on Hydra https://hydra.nixos.org/job/nixpkgs/staging-next/dcs.x86_64-darwin
|
|
};
|
|
}
|