Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
config.allowUnfree = true;
};

lib = pkgs.lib;

packages = rec {
proj = pkgs.python3Packages.callPackage ./pkgs/proj {
inherit pytest-skip-slow;
Expand Down
9 changes: 9 additions & 0 deletions pkgs/doctest/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{ pkgs
, fetchpatch
}:

pkgs.doctest.overrideAttrs ( old: rec {
Expand All @@ -11,5 +12,13 @@ pkgs.doctest.overrideAttrs ( old: rec {
};
patches = [
./doctest-template-test.patch

# Fix the build with Clang.
(fetchpatch {
name = "doctest-disable-warnings.patch";
url = "https://github.com/doctest/doctest/commit/c8d9ed2398d45aa5425d913bd930f580560df30d.patch";
excludes = [ ".github/workflows/main.yml" ];
hash = "sha256-kOBy0om6MPM2vLXZjNLXiezZqVgNr/viBI7mXrOZts8=";
})
];
})
24 changes: 17 additions & 7 deletions pkgs/ff-clang-format.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{ stdenv
{ pkgs
, stdenv
, lib
, autoPatchelfHook
, fetchurl
Expand All @@ -10,12 +11,21 @@ stdenv.mkDerivation rec {

system = "x86_64-linux";

src = fetchurl {
url = "https://github.com/muttleyxd/clang-tools-static-binaries/releases/download/${version}/clang-format-16_linux-amd64";
hash = "sha256-5eTzOVcmuvSNGr2lyQrBO2Rs0vOed5k7ICPw0IPq4sE=";
};
src = let
blobs = {
x86_64-linux = {
url = "https://github.com/muttleyxd/clang-tools-static-binaries/releases/download/${version}/clang-format-16_linux-amd64";
hash = "sha256-5eTzOVcmuvSNGr2lyQrBO2Rs0vOed5k7ICPw0IPq4sE=";
};
x86_64-darwin = {
url = "https://github.com/muttleyxd/clang-tools-static-binaries/releases/download/${version}/clang-format-16_macosx-amd64";
hash = "sha256-I9F/mn3I+ZAq2aDw0Mc9Imo+AJMwbzsjalqBSo/7DL4=";
};
};
in
fetchurl blobs.${pkgs.system};

nativeBuildInputs = [
nativeBuildInputs = lib.optionals stdenv.isLinux [
autoPatchelfHook
];

Expand All @@ -29,6 +39,6 @@ stdenv.mkDerivation rec {

meta = with lib; {
homepage = "https://github.com/muttleyxd/clang-tools-static-binaries";
platforms = platforms.linux;
platforms = platforms.linux ++ platforms.darwin;
};
}
17 changes: 11 additions & 6 deletions pkgs/proj/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{ buildPythonApplication
{ pkgs
, buildPythonApplication
, pytestCheckHook
, typing-extensions
, enlighten
Expand Down Expand Up @@ -34,17 +35,21 @@
}:

let
lib = pkgs.lib;
stdenv = pkgs.stdenv;

bins = [
valgrind
kcachegrind
ff-clang-format
bencher-cli
hotspot
perf
ccache
compdb
cmake
lcov
] ++ lib.optionals stdenv.isLinux [
bencher-cli
hotspot
valgrind
kcachegrind
perf
];
in
buildPythonApplication {
Expand Down