mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-02 19:14:14 +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.
75 lines
1.7 KiB
Nix
75 lines
1.7 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchFromGitHub
|
|
, boost182
|
|
, catch2_3
|
|
, cmake
|
|
, ninja
|
|
, fmt_9
|
|
, python3
|
|
}:
|
|
|
|
let
|
|
# dependency for this library has been removed in master (i.e. next release)
|
|
unordered_dense = stdenv.mkDerivation rec {
|
|
version = "2.0.1";
|
|
pname = "unordered_dense";
|
|
src = fetchFromGitHub {
|
|
owner = "martinus";
|
|
repo = pname;
|
|
rev = "v${version}";
|
|
sha256 = "sha256-9zlWYAY4lOQsL9+MYukqavBi5k96FvglRgznLIwwRyw=";
|
|
};
|
|
nativeBuildInputs = [
|
|
cmake
|
|
];
|
|
};
|
|
|
|
in
|
|
stdenv.mkDerivation rec {
|
|
pname = "sv-lang";
|
|
version = "3.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "MikePopoloski";
|
|
repo = "slang";
|
|
rev = "v${version}";
|
|
sha256 = "sha256-v2sStvukLFMRXGeATxvizmnwEPDE4kwnS06n+37OrJA=";
|
|
};
|
|
|
|
cmakeFlags = [
|
|
# fix for https://github.com/NixOS/nixpkgs/issues/144170
|
|
"-DCMAKE_INSTALL_INCLUDEDIR=include"
|
|
"-DCMAKE_INSTALL_LIBDIR=lib"
|
|
|
|
"-DSLANG_INCLUDE_TESTS=${if doCheck then "ON" else "OFF"}"
|
|
];
|
|
|
|
nativeBuildInputs = [
|
|
cmake
|
|
python3
|
|
ninja
|
|
];
|
|
|
|
buildInputs = [
|
|
unordered_dense
|
|
boost182
|
|
fmt_9
|
|
# though only used in tests, cmake will complain its absence when configuring
|
|
catch2_3
|
|
];
|
|
|
|
# TODO: a mysterious linker error occurs when building the unittests on darwin.
|
|
# The error occurs when using catch2_3 in nixpkgs, not when fetching catch2_3 using CMake
|
|
doCheck = !stdenv.hostPlatform.isDarwin;
|
|
|
|
meta = with lib; {
|
|
description = "SystemVerilog compiler and language services";
|
|
homepage = "https://github.com/MikePopoloski/slang";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ sharzy ];
|
|
mainProgram = "slang";
|
|
platforms = platforms.all;
|
|
};
|
|
}
|