Compare commits

...

3 Commits

Author SHA1 Message Date
e1e0738a69
Use nixpkgs from flake.lock and support attrs when importing bscpkgs
This makes `nix-build` and friends use the current flake lock instead of
the outdated pinned version we had in `./nixpkgs.nix`

With this, `nix-build -A ovni` and `nix build .#ovni` will produce the
same result.

This will fail if the flake nixpkgs input does not come from NixOS/nixpkgs.
We could use edolstra/flake-compat instead, but it's overkill imho.

Additionally, I made default.nix behave like nixpkgs, so that we can
import bscpkgs à la nixpkgs (Apply overlays and other options that nixpkgs
accepts): `import bscpkgs { overlays = [ <...> ]; }`
2025-02-28 17:05:12 +01:00
cfd192c990
treewide: update to new bscpm url 2025-02-28 15:39:23 +01:00
8bc9a86f6d
Add bsc-ci to hydraJobs in flake output 2025-02-28 15:39:23 +01:00
12 changed files with 28 additions and 25 deletions

View File

@ -1,11 +1,19 @@
let
bscOverlay = import ./overlay.nix;
# Pin the nixpkgs
nixpkgsPath = import ./nixpkgs.nix;
pkgs = import nixpkgsPath {
overlays = [ bscOverlay ];
# read flake.lock and determine revision from there
lock = builtins.fromJSON (builtins.readFile ./flake.lock);
inherit (lock.nodes.nixpkgs.locked) rev narHash;
fetchedNixpkgs = builtins.fetchTarball {
url = "https://github.com/NixOS/nixpkgs/archive/${rev}.tar.gz";
sha256 = narHash;
};
in pkgs
in
{ overlays ? [ ]
, nixpkgs ? fetchedNixpkgs
, ...
}@attrs:
import nixpkgs (
(builtins.removeAttrs attrs [ "overlays" "nixpkgs" ]) //
{ overlays = [ bscOverlay ] ++ overlays; }
)

View File

@ -13,5 +13,9 @@
bscOverlay = import ./overlay.nix;
overlays.default = self.bscOverlay;
legacyPackages.x86_64-linux = pkgs;
hydraJobs = {
inherit (pkgs) bsc-ci;
};
};
}

View File

@ -1,9 +0,0 @@
let
commit = "e4ad989506ec7d71f7302cc3067abd82730a4beb";
in builtins.fetchTarball {
# Descriptive name to make the store path easier to identify
name = "nixpkgs-${commit}";
url = "https://github.com/nixos/nixpkgs/archive/${commit}.tar.gz";
# Hash obtained using `nix-prefetch-url --unpack <url>`
sha256 = "sha256-de9KYi8rSJpqvBfNwscWdalIJXPo8NjdIZcEJum1mH0=";
}

View File

@ -7,7 +7,7 @@
, mpi
, tampi
, gitBranch ? "master"
, gitURL ? "ssh://git@bscpm03.bsc.es/rarias/bench6.git"
, gitURL ? "ssh://git@bscpm04.bsc.es/rarias/bench6.git"
, gitCommit ? "1e6ce2aa8ad7b4eef38df1581d7ec48a8815f85d"
}:

View File

@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
] ++ optionals (enableTest) [ mpi clangOmpss2 tampi ];
src = builtins.fetchGit {
url = "ssh://git@bscpm03.bsc.es/rarias/cn6.git";
url = "ssh://git@bscpm04.bsc.es/rarias/cn6.git";
ref = "master";
rev = "c72c3b66b720c2a33950f536fc819051c8f20a69";
};

View File

@ -14,7 +14,7 @@
, gcc # needed to set the rpath of libstdc++ for clang-tblgen
, enableDebug ? false
, useGit ? false
, gitUrl ? "ssh://git@bscpm03.bsc.es/llvm-ompss/llvm-mono.git"
, gitUrl ? "ssh://git@bscpm04.bsc.es/llvm-ompss/llvm-mono.git"
, gitBranch ? "master"
, gitCommit ? "8c0d267c04d7fc3fb923078f510fcd5f4719a6cc"
}:

View File

@ -23,7 +23,7 @@ stdenv.mkDerivation rec {
};
src = builtins.fetchGit {
url = "ssh://git@bscpm03.bsc.es/mercurium/mcxx";
url = "ssh://git@bscpm04.bsc.es/mercurium/mcxx";
ref = "master";
};

View File

@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
#src = /home/Computational/rarias/mcxx;
src = builtins.fetchGit {
url = "ssh://git@bscpm03.bsc.es/rarias/mcxx";
url = "ssh://git@bscpm04.bsc.es/rarias/mcxx";
rev = "44129a6ac05b8f78b06e9e2eff71438b5ca4d29f";
};

View File

@ -17,7 +17,7 @@
, cachelineBytes ? 64
, enableGlibcxxDebug ? false
, useGit ? false
, gitUrl ? "ssh://git@bscpm03.bsc.es/nanos6/nanos6"
, gitUrl ? "ssh://git@bscpm04.bsc.es/nanos6/nanos6"
, gitBranch ? "master"
, gitCommit ? "9f54c988e0a8b9c011d9d526acdb8d76f18fcae4"
}:

View File

@ -7,7 +7,7 @@ stdenv.mkDerivation rec {
pname = "nixtools";
version = "${src.shortRev}";
src = builtins.fetchGit {
url = "ssh://git@bscpm03.bsc.es/rarias/nixtools";
url = "ssh://git@bscpm04.bsc.es/rarias/nixtools";
ref = "master";
rev = "a103e392048ace3ed88ce74648b32c9e6ed094da";
};

View File

@ -6,7 +6,7 @@
, fetchFromGitHub
, useGit ? false
, gitBranch ? "master"
, gitUrl ? "ssh://git@bscpm03.bsc.es/rarias/ovni.git"
, gitUrl ? "ssh://git@bscpm04.bsc.es/rarias/ovni.git"
, gitCommit ? "a7103f8510d1ec124c3e01ceb47d1e443e98bbf4"
, enableDebug ? false
# Only enable MPI if the build is native (fails on cross-compilation)

View File

@ -13,7 +13,7 @@
, enableOvni ? true
, ovni ? null
, useGit ? false
, gitUrl ? "ssh://git@bscpm03.bsc.es/interoperability/tampi.git"
, gitUrl ? "ssh://git@bscpm04.bsc.es/interoperability/tampi.git"
, gitBranch ? "master"
, gitCommit ? "a5c93bf8ab045b71ad4a8d5e2c991ce774db5cbc"
}: