forked from rarias/jungle
Compare commits
1 Commits
pkgs/taope
...
quick-shel
| Author | SHA1 | Date | |
|---|---|---|---|
|
9deef256a2
|
@@ -19,6 +19,7 @@ let
|
||||
cudainfo = prev.callPackage ./pkgs/cudainfo/default.nix { };
|
||||
#extrae = callPackage ./pkgs/extrae/default.nix { }; # Broken and outdated
|
||||
gpi-2 = callPackage ./pkgs/gpi-2/default.nix { };
|
||||
quickShell = import ./pkgs/quick-shell/default.nix { pkgs = final; };
|
||||
intelPackages_2023 = callPackage ./pkgs/intel-oneapi/2023.nix { };
|
||||
jemallocNanos6 = callPackage ./pkgs/nanos6/jemalloc.nix { };
|
||||
# FIXME: Extend this to all linuxPackages variants. Open problem, see:
|
||||
@@ -60,7 +61,6 @@ let
|
||||
tagaspi = callPackage ./pkgs/tagaspi/default.nix { };
|
||||
tampi = callPackage ./pkgs/tampi/default.nix { };
|
||||
upc-qaire-exporter = prev.callPackage ./pkgs/upc-qaire-exporter/default.nix { };
|
||||
taopencl = callPackage ./pkgs/taopencl/default.nix { };
|
||||
wxparaver = callPackage ./pkgs/paraver/default.nix { };
|
||||
};
|
||||
|
||||
|
||||
76
pkgs/quick-shell/default.nix
Normal file
76
pkgs/quick-shell/default.nix
Normal file
@@ -0,0 +1,76 @@
|
||||
{ pkgs }:
|
||||
|
||||
# This builds devshells using passthru to populate packages and inputsFrom
|
||||
# lazily.
|
||||
#
|
||||
# Packages prefixed with @ are added to inputsFrom and the rest are
|
||||
# added to packages. This makes it possible to obtain a devshell with combining
|
||||
# inputsFrom and packages from the comand line:
|
||||
#
|
||||
# $ nix develop .#quickShell.@nosv.clang-tools.ovni.@tampi
|
||||
#
|
||||
# is equivalent to:
|
||||
#
|
||||
# with pkgs; mkShell {
|
||||
# packages = [ clang-tools ovni ];
|
||||
# inputsFrom = [ nosv tampi ];
|
||||
# }
|
||||
#
|
||||
|
||||
let
|
||||
inherit (builtins) attrNames getAttr listToAttrs;
|
||||
inherit (pkgs) lib;
|
||||
|
||||
# list of all packages' names
|
||||
names = attrNames pkgs;
|
||||
|
||||
# generate a attributes containing the selected packages + all the available
|
||||
# packages in names ("" -> packages and "@" -> inputsFrom)
|
||||
go =
|
||||
selected:
|
||||
let
|
||||
mkAttrs =
|
||||
isInputs:
|
||||
(map (
|
||||
name:
|
||||
let
|
||||
pkg = getAttr name pkgs;
|
||||
in
|
||||
{
|
||||
name = (if isInputs then "@" else "") + name;
|
||||
value = go (
|
||||
if isInputs then
|
||||
{
|
||||
inherit (selected) packages;
|
||||
inputsFrom = selected.inputsFrom ++ [ pkg ];
|
||||
}
|
||||
else
|
||||
{
|
||||
inherit (selected) inputsFrom;
|
||||
packages = selected.packages ++ [ pkg ];
|
||||
}
|
||||
);
|
||||
}
|
||||
) names);
|
||||
|
||||
attrs = listToAttrs ((mkAttrs true) ++ (mkAttrs false));
|
||||
|
||||
drv = pkgs.mkShell {
|
||||
inherit (selected) inputsFrom packages;
|
||||
name = # build a label from inputsFrom
|
||||
if (selected.inputsFrom == [ ]) then
|
||||
"nix-quick-shell"
|
||||
else
|
||||
lib.concatStringsSep "-" (map (v: v.pname or v.name or "unknown") selected.inputsFrom);
|
||||
};
|
||||
in
|
||||
drv.overrideAttrs {
|
||||
passthru = attrs // {
|
||||
_passthru = drv.passthru;
|
||||
};
|
||||
};
|
||||
in
|
||||
go {
|
||||
inputsFrom = [ ];
|
||||
packages = [ ];
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
{
|
||||
stdenv
|
||||
, automake
|
||||
, autoconf
|
||||
, libtool
|
||||
, gnumake
|
||||
, boost
|
||||
, mpi
|
||||
, gcc
|
||||
, autoreconfHook
|
||||
, ocl-icd
|
||||
, opencl-headers
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "taopencl";
|
||||
version = finalAttrs.src.shortRev;
|
||||
|
||||
src = builtins.fetchGit {
|
||||
url = "git@gitlab-internal.bsc.es:task-awareness/taopencl/taopencl.git";
|
||||
ref = "master";
|
||||
rev = "c3b7b32ae8fa4af7ceff598532a881f8f1490aaf";
|
||||
};
|
||||
|
||||
enableParallelBuilding = true;
|
||||
separateDebugInfo = true;
|
||||
|
||||
configureFlags = [
|
||||
"--with-opencl-lib=${ocl-icd}/lib"
|
||||
"--with-opencl-include=${opencl-headers}/include"
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
autoreconfHook
|
||||
automake
|
||||
autoconf
|
||||
libtool
|
||||
gnumake
|
||||
boost
|
||||
mpi
|
||||
gcc
|
||||
];
|
||||
|
||||
dontDisableStatic = true;
|
||||
hardeningDisable = [ "all" ];
|
||||
})
|
||||
Reference in New Issue
Block a user