Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
frama-c
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
pub
frama-c
Commits
81f3abaf
Commit
81f3abaf
authored
4 years ago
by
Virgile Prevosto
Browse files
Options
Downloads
Patches
Plain Diff
make nix attributes in default.nix extensible
parent
2fc09908
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
nix/default.nix
+26
-24
26 additions, 24 deletions
nix/default.nix
with
26 additions
and
24 deletions
nix/default.nix
+
26
−
24
View file @
81f3abaf
...
@@ -25,13 +25,15 @@ let mk_buildInputs = { opamPackages ? [], nixPackages ? [] } :
...
@@ -25,13 +25,15 @@ let mk_buildInputs = { opamPackages ? [], nixPackages ? [] } :
}
//
args
);
}
//
args
);
in
in
rec
{
pkgs
.
lib
.
makeExtensible
(
self
:
{
inherit
src
mk_buildInputs
;
inherit
src
mk_buildInputs
;
buildInputs
=
mk_buildInputs
{};
buildInputs
=
mk_buildInputs
{};
installed
=
main
.
out
;
installed
=
self
.
main
.
out
;
main
=
mk_deriv
{
main
=
mk_deriv
{
name
=
"frama-c"
;
name
=
"frama-c"
;
inherit
src
buildInputs
;
src
=
self
.
src
;
buildInputs
=
self
.
buildInputs
;
outputs
=
[
"out"
"build_dir"
];
outputs
=
[
"out"
"build_dir"
];
postPatch
=
''
postPatch
=
''
patchShebangs .
patchShebangs .
...
@@ -73,9 +75,9 @@ rec {
...
@@ -73,9 +75,9 @@ rec {
lint
=
mk_deriv
{
lint
=
mk_deriv
{
name
=
"frama-c-lint"
;
name
=
"frama-c-lint"
;
inherit
src
;
src
=
self
.
src
;
buildInputs
=
buildInputs
=
(
mk_buildInputs
{
(
self
.
mk_buildInputs
{
nixPackages
=
[
pkgs
.
bc
];
nixPackages
=
[
pkgs
.
bc
];
opamPackages
=
[
opamPackages
=
[
{
name
=
"ocp-indent"
;
constraint
=
"=1.7.0"
;
}
{
name
=
"ocp-indent"
;
constraint
=
"=1.7.0"
;
}
...
@@ -102,9 +104,9 @@ rec {
...
@@ -102,9 +104,9 @@ rec {
tests
=
mk_deriv
{
tests
=
mk_deriv
{
name
=
"frama-c-test"
;
name
=
"frama-c-test"
;
inherit
buildInputs
;
buildInputs
=
self
.
buildInputs
;
build_dir
=
main
.
build_dir
;
build_dir
=
self
.
main
.
build_dir
;
src
=
main
.
build_dir
+
"/dir.tar"
;
src
=
self
.
main
.
build_dir
+
"/dir.tar"
;
sourceRoot
=
"."
;
sourceRoot
=
"."
;
postUnpack
=
''
postUnpack
=
''
find . \( -name "Makefile*" -or -name ".depend" -o -name "ptests_config" -o -name "config.status" \) -exec bash -c "t=\$(stat -c %y \"\$0\"); sed -i -e \"s&$(cat $build_dir/old_pwd)&$(pwd)&g\" \"\$0\"; touch -d \"\$t\" \"\$0\"" {} \;
find . \( -name "Makefile*" -or -name ".depend" -o -name "ptests_config" -o -name "config.status" \) -exec bash -c "t=\$(stat -c %y \"\$0\"); sed -i -e \"s&$(cat $build_dir/old_pwd)&$(pwd)&g\" \"\$0\"; touch -d \"\$t\" \"\$0\"" {} \;
...
@@ -124,9 +126,9 @@ rec {
...
@@ -124,9 +126,9 @@ rec {
build-distrib-tarball
=
mk_deriv
{
build-distrib-tarball
=
mk_deriv
{
name
=
"frama-c-build-distrib-tarball"
;
name
=
"frama-c-build-distrib-tarball"
;
inherit
src
;
src
=
self
.
src
;
buildInputs
=
buildInputs
=
(
mk_buildInputs
{
(
self
.
mk_buildInputs
{
opamPackages
=
[
opamPackages
=
[
{
name
=
"headache"
;
constraint
=
"=1.05"
;
}
{
name
=
"headache"
;
constraint
=
"=1.05"
;
}
];}
);
];}
);
...
@@ -151,8 +153,8 @@ rec {
...
@@ -151,8 +153,8 @@ rec {
build-from-distrib-tarball
=
mk_deriv
{
build-from-distrib-tarball
=
mk_deriv
{
name
=
"frama-c-build-from-distrib-tarball"
;
name
=
"frama-c-build-from-distrib-tarball"
;
inherit
buildInputs
;
buildInputs
=
self
.
buildInputs
;
src
=
build-distrib-tarball
.
out
;
src
=
self
.
build-distrib-tarball
.
out
;
outputs
=
[
"out"
];
outputs
=
[
"out"
];
configurePhase
=
''
configurePhase
=
''
unset CC
unset CC
...
@@ -169,9 +171,9 @@ rec {
...
@@ -169,9 +171,9 @@ rec {
wp-qualif
=
mk_deriv
{
wp-qualif
=
mk_deriv
{
name
=
"frama-c-wp-qualif"
;
name
=
"frama-c-wp-qualif"
;
buildInputs
=
mk_buildInputs
{
};
buildInputs
=
self
.
mk_buildInputs
{
};
build_dir
=
main
.
build_dir
;
build_dir
=
self
.
main
.
build_dir
;
src
=
main
.
build_dir
+
"/dir.tar"
;
src
=
self
.
main
.
build_dir
+
"/dir.tar"
;
sourceRoot
=
"."
;
sourceRoot
=
"."
;
postUnpack
=
''
postUnpack
=
''
find . \( -name "Makefile*" -or -name ".depend" -o -name "ptests_config" -o -name "config.status" \) -exec bash -c "t=\$(stat -c %y \"\$0\"); sed -i -e \"s&$(cat $build_dir/old_pwd)&$(pwd)&g\" \"\$0\"; touch -d \"\$t\" \"\$0\"" {} \;
find . \( -name "Makefile*" -or -name ".depend" -o -name "ptests_config" -o -name "config.status" \) -exec bash -c "t=\$(stat -c %y \"\$0\"); sed -i -e \"s&$(cat $build_dir/old_pwd)&$(pwd)&g\" \"\$0\"; touch -d \"\$t\" \"\$0\"" {} \;
...
@@ -197,9 +199,9 @@ rec {
...
@@ -197,9 +199,9 @@ rec {
aorai-prove
=
mk_deriv
{
aorai-prove
=
mk_deriv
{
name
=
"frama-c-aorai-prove"
;
name
=
"frama-c-aorai-prove"
;
buildInputs
=
mk_buildInputs
{
};
buildInputs
=
self
.
mk_buildInputs
{
};
build_dir
=
main
.
build_dir
;
build_dir
=
self
.
main
.
build_dir
;
src
=
main
.
build_dir
+
"/dir.tar"
;
src
=
self
.
main
.
build_dir
+
"/dir.tar"
;
sourceRoot
=
"."
;
sourceRoot
=
"."
;
postUnpack
=
''
postUnpack
=
''
find . \( -name "Makefile*" -or -name ".depend" -o -name "ptests_config" -o -name "test_config*" -o -name "config.status" \) -exec bash -c "t=\$(stat -c %y \"\$0\"); sed -i -e \"s&$(cat $build_dir/old_pwd)&$(pwd)&g\" \"\$0\"; touch -d \"\$t\" \"\$0\"" {} \;
find . \( -name "Makefile*" -or -name ".depend" -o -name "ptests_config" -o -name "test_config*" -o -name "config.status" \) -exec bash -c "t=\$(stat -c %y \"\$0\"); sed -i -e \"s&$(cat $build_dir/old_pwd)&$(pwd)&g\" \"\$0\"; touch -d \"\$t\" \"\$0\"" {} \;
...
@@ -225,9 +227,9 @@ rec {
...
@@ -225,9 +227,9 @@ rec {
e-acsl-tests-dev
=
mk_deriv
{
e-acsl-tests-dev
=
mk_deriv
{
name
=
"frama-c-e-acsl-tests-dev"
;
name
=
"frama-c-e-acsl-tests-dev"
;
buildInputs
=
mk_buildInputs
{
nixPackages
=
[
pkgs
.
gmp
pkgs
.
getopt
];
};
buildInputs
=
self
.
mk_buildInputs
{
nixPackages
=
[
pkgs
.
gmp
pkgs
.
getopt
];
};
build_dir
=
main
.
build_dir
;
build_dir
=
self
.
main
.
build_dir
;
src
=
main
.
build_dir
+
"/dir.tar"
;
src
=
self
.
main
.
build_dir
+
"/dir.tar"
;
sourceRoot
=
"."
;
sourceRoot
=
"."
;
postUnpack
=
''
postUnpack
=
''
find . \( -name "Makefile*" -or -name ".depend" -o -name "ptests_config" -o -name "config.status" \) -exec bash -c "t=\$(stat -c %y \"\$0\"); sed -i -e \"s&$(cat $build_dir/old_pwd)&$(pwd)&g\" \"\$0\"; touch -d \"\$t\" \"\$0\"" {} \;
find . \( -name "Makefile*" -or -name ".depend" -o -name "ptests_config" -o -name "config.status" \) -exec bash -c "t=\$(stat -c %y \"\$0\"); sed -i -e \"s&$(cat $build_dir/old_pwd)&$(pwd)&g\" \"\$0\"; touch -d \"\$t\" \"\$0\"" {} \;
...
@@ -247,8 +249,8 @@ rec {
...
@@ -247,8 +249,8 @@ rec {
internal
=
mk_deriv
{
internal
=
mk_deriv
{
name
=
"frama-c-internal"
;
name
=
"frama-c-internal"
;
inherit
src
;
src
=
self
.
src
;
buildInputs
=
(
mk_buildInputs
{
opamPackages
=
[
"xml-light"
];
}
)
++
buildInputs
=
(
self
.
mk_buildInputs
{
opamPackages
=
[
"xml-light"
];
}
)
++
[
pkgs
.
getopt
[
pkgs
.
getopt
pkgs
.
libxslt
pkgs
.
libxml2
pkgs
.
autoPatchelfHook
pkgs
.
libxslt
pkgs
.
libxml2
pkgs
.
autoPatchelfHook
pkgs
.
swiProlog
pkgs
.
swiProlog
...
@@ -320,4 +322,4 @@ rec {
...
@@ -320,4 +322,4 @@ rec {
''
;
''
;
};
};
}
}
)
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