This repository has been archived on 2024-01-28. You can view files and clone it, but cannot push or open issues or pull requests.
ecg-prog-filtered/flake.nix

73 lines
2 KiB
Nix
Raw Permalink Normal View History

2023-04-21 22:24:39 +02:00
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
2023-04-21 22:24:39 +02:00
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }: flake-utils.lib.eachDefaultSystem (system:
let
2023-05-20 11:20:03 +02:00
inherit (nixpkgs) lib;
2023-04-21 22:24:39 +02:00
pkgs = import nixpkgs { inherit system; };
mkNocheck = drv: drv.overrideAttrs (o: {
doCheck = false;
checkInputs = [ ];
});
2023-05-20 11:20:43 +02:00
mkClang = drv: drv.override (o: {
stdenv = pkgs.clangStdenv;
});
2023-04-21 22:24:39 +02:00
in
{
2023-05-20 11:20:03 +02:00
packages = lib.foldAttrs lib.const { }
(lib.flatten (lib.mapAttrsToList
(name: v: {
"${name}" = v;
"${name}-nocheck" = mkNocheck v;
2023-05-20 11:20:43 +02:00
"${name}-clang" = mkClang v;
"${name}-nocheck-clang" = mkClang (mkNocheck v);
2023-05-20 11:20:03 +02:00
})
rec {
u01 = pkgs.callPackage
({ stdenv, catch2_3, cmake }: stdenv.mkDerivation {
name = "ecg-u01";
2023-04-21 22:46:18 +02:00
2023-05-20 11:20:03 +02:00
src = ./u01;
2023-04-21 22:46:18 +02:00
2023-05-20 11:20:03 +02:00
nativeBuildInputs = [ cmake ];
checkInputs = [ catch2_3 ];
2023-05-04 09:01:18 +02:00
2023-05-20 11:20:03 +02:00
doCheck = true;
})
{ };
2023-05-04 09:01:18 +02:00
2023-05-20 11:20:03 +02:00
u02 = pkgs.callPackage
({ stdenv, catch2_3, cmake, freeglut, libGL, libGLU }: stdenv.mkDerivation {
name = "ecg-u02";
2023-05-04 09:01:18 +02:00
2023-05-20 11:20:03 +02:00
src = ./u02;
2023-05-04 09:01:18 +02:00
2023-05-20 11:20:03 +02:00
nativeBuildInputs = [ cmake ];
buildInputs = [ freeglut libGL libGLU ];
checkInputs = [ catch2_3 ];
2023-05-20 11:20:03 +02:00
doCheck = true;
})
{ };
2023-05-18 09:29:40 +02:00
2023-05-20 11:20:03 +02:00
u03 = pkgs.callPackage
({ stdenv, cmake, freeglut, libGL, libGLU }: stdenv.mkDerivation {
name = "ecg-u03";
2023-05-18 09:29:40 +02:00
2023-05-20 11:20:03 +02:00
src = ./u03;
2023-05-18 09:29:40 +02:00
2023-05-20 11:20:03 +02:00
nativeBuildInputs = [ cmake ];
buildInputs = [ freeglut libGL libGLU ];
})
{ };
}));
2023-04-21 22:46:18 +02:00
2023-04-21 22:24:39 +02:00
devShells.default = pkgs.mkShell {
2023-05-20 11:20:43 +02:00
nativeBuildInputs = with pkgs; [ catch2_3 clang cmake freeglut libGL libGLU reuse ];
2023-04-21 22:24:39 +02:00
};
});
}