Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
batsched
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
poquet
millian
batsched
Commits
058fd1ef
Commit
058fd1ef
authored
1 year ago
by
Millian Poquet
Browse files
Options
Downloads
Patches
Plain Diff
nix: flake setup
parent
d6c913b0
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
flake.lock
+144
-0
144 additions, 0 deletions
flake.lock
flake.nix
+58
-1
58 additions, 1 deletion
flake.nix
nix/batsched.nix
+50
-0
50 additions, 0 deletions
nix/batsched.nix
with
252 additions
and
1 deletion
flake.lock
0 → 100644
+
144
−
0
View file @
058fd1ef
{
"nodes": {
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1685518550,
"narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_2": {
"inputs": {
"systems": "systems_2"
},
"locked": {
"lastModified": 1681202837,
"narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "cfacdce06f30d2b68473a46042957675eebb3401",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"intervalset": {
"inputs": {
"flake-utils": [
"flake-utils"
],
"nixpkgs": [
"nixpkgs"
],
"nur-kapack": [
"nur-kapack"
]
},
"locked": {
"lastModified": 1685006270,
"narHash": "sha256-cJlbAF8m2PCX2iqepq3uKmKkOOF2bAjSpKMP4KXoevk=",
"ref": "refs/heads/master",
"rev": "2b449c3b8d88e7ed2008fe618846d437a4fd8ee5",
"revCount": 83,
"type": "git",
"url": "https://framagit.org/batsim/intervalset"
},
"original": {
"type": "git",
"url": "https://framagit.org/batsim/intervalset"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1669833724,
"narHash": "sha256-/HEZNyGbnQecrgJnfE8d0WC5c1xuPSD2LUpB6YXlg4c=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "4d2b37a84fad1091b9de401eb450aae66f1a741e",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "22.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nur-kapack": {
"inputs": {
"flake-utils": "flake-utils_2",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1682575206,
"narHash": "sha256-hjoGc2gOa8IEcwDucNRoE2fryoRciPOJ7GBUShj3OY4=",
"owner": "oar-team",
"repo": "nur-kapack",
"rev": "7fa57b4170962b5c88d077d6f625628e7763c81c",
"type": "github"
},
"original": {
"owner": "oar-team",
"ref": "master",
"repo": "nur-kapack",
"type": "github"
}
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"intervalset": "intervalset",
"nixpkgs": "nixpkgs",
"nur-kapack": "nur-kapack"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_2": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},
"root": "root",
"version": 7
}
This diff is collapsed.
Click to expand it.
flake.nix
+
58
−
1
View file @
058fd1ef
{
outputs
=
{
...
}:
{
};
inputs
=
{
nixpkgs
.
url
=
"github:nixos/nixpkgs?ref=22.11"
;
nur-kapack
=
{
url
=
"github:oar-team/nur-kapack/master"
;
inputs
.
nixpkgs
.
follows
=
"nixpkgs"
;
# tell kapack to use the nixpkgs that is defined above
};
flake-utils
.
url
=
"github:numtide/flake-utils"
;
intervalset
=
{
url
=
"git+https://framagit.org/batsim/intervalset"
;
inputs
.
nixpkgs
.
follows
=
"nixpkgs"
;
inputs
.
nur-kapack
.
follows
=
"nur-kapack"
;
inputs
.
flake-utils
.
follows
=
"flake-utils"
;
};
};
outputs
=
{
self
,
nixpkgs
,
nur-kapack
,
flake-utils
,
intervalset
}:
flake-utils
.
lib
.
eachSystem
[
"x86_64-linux"
]
(
system
:
let
pkgs
=
import
nixpkgs
{
inherit
system
;
};
kapack
=
nur-kapack
.
packages
.
${
system
};
release-options
=
{
debug
=
false
;
doCoverage
=
false
;
intervalset
=
intervalset
.
packages-release
.
${
system
}
.
intervalset
;
};
debug-options
=
{
debug
=
true
;
doCoverage
=
false
;
intervalset
=
intervalset
.
packages-debug
.
${
system
}
.
intervalset
;
};
debug-cov-options
=
debug-options
//
{
doCoverage
=
true
;
};
base-defs
=
{
cppMesonDevBase
=
nur-kapack
.
lib
.
${
system
}
.
cppMesonDevBase
;
loguru
=
kapack
.
loguru
;
redox
=
kapack
.
redox
;
};
callPackage
=
mergedPkgs
:
deriv-func
:
attrset
:
options
:
pkgs
.
lib
.
callPackageWith
(
mergedPkgs
//
options
)
deriv-func
attrset
;
in
rec
{
functions
=
rec
{
batsched
=
import
./nix/batsched.nix
;
generate-packages
=
mergedPkgs
:
options
:
{
batsched
=
callPackage
mergedPkgs
batsched
{}
options
;
};
};
packages-debug
=
functions
.
generate-packages
(
pkgs
//
base-defs
//
packages-debug
)
debug-options
;
packages-debug-cov
=
functions
.
generate-packages
(
pkgs
//
base-defs
//
packages-debug-cov
)
debug-cov-options
;
packages-release
=
functions
.
generate-packages
(
pkgs
//
base-defs
//
packages-release
)
release-options
;
packages
=
packages-release
//
{
ci-batsched-werror-gcc
=
callPackage
pkgs
functions
.
batsched
({
stdenv
=
pkgs
.
gccStdenv
;
werror
=
true
;
}
//
base-defs
)
release-options
;
ci-batsched-werror-clang
=
callPackage
pkgs
functions
.
batsched
({
stdenv
=
pkgs
.
clangStdenv
;
werror
=
true
;
}
//
base-defs
)
release-options
;
};
devShells
=
{};
}
);
}
This diff is collapsed.
Click to expand it.
nix/batsched.nix
0 → 100644
+
50
−
0
View file @
058fd1ef
{
stdenv
,
lib
,
cppMesonDevBase
,
meson
,
ninja
,
pkgconfig
,
intervalset
,
boost
,
cppzmq
,
gmp
,
loguru
,
rapidjson
,
redox
,
zeromq
,
doInternalTests
?
true
,
debug
?
false
,
werror
?
false
,
doCoverage
?
false
}:
(
cppMesonDevBase
{
inherit
stdenv
lib
meson
ninja
pkgconfig
debug
werror
doCoverage
;
coverageGcnoGlob
=
"batsched.p/*.gcno"
;
})
.
overrideAttrs
(
attrs
:
rec
{
name
=
"batsched"
;
BOOST_INCLUDEDIR
=
"
${
lib
.
getDev
boost
}
/include"
;
BOOST_LIBRARYDIR
=
"
${
lib
.
getLib
boost
}
/lib"
;
src
=
lib
.
sourceByRegex
../.
[
"^meson
\.
build"
"^src"
"^src/.*
\.
?pp"
"^src/algo"
"^src/algo/.*
\.
?pp"
"^src/external"
"^src/external/.*
\.
?pp"
];
buildInputs
=
[
intervalset
boost
cppzmq
gmp
loguru
rapidjson
redox
zeromq
];
passthru
=
rec
{
hasDebugSymbols
=
debug
;
hasCoverage
=
doCoverage
;
GCOV_PREFIX_STRIP
=
"5"
;
DEBUG_SRC_DIRS
=
[
"
${
src
}
/src"
]
++
intervalset
.
DEBUG_SRC_DIRS
;
GDB_DIR_ARGS
=
map
(
x
:
"--directory="
+
x
)
DEBUG_SRC_DIRS
;
};
})
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment