From 35d35a3c349a20a2d1c2f519e7b89f2c6a960b86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Bobot?= <francois.bobot@cea.fr> Date: Mon, 5 Aug 2019 13:20:05 +0200 Subject: [PATCH] Update nix/frama-ci.* --- nix/frama-ci.nix | 15 +++++++++++++++ nix/frama-ci.sh | 12 ++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 nix/frama-ci.nix create mode 100644 nix/frama-ci.sh diff --git a/nix/frama-ci.nix b/nix/frama-ci.nix new file mode 100644 index 00000000..f91f77e3 --- /dev/null +++ b/nix/frama-ci.nix @@ -0,0 +1,15 @@ +#To copy in other repository +{ pkgs ? import <nixpkgs> {}, password}: + +let + src = builtins.fetchGit { + "url" = "https://bobot:${password}@git.frama-c.com/frama-c/Frama-CI.git"; + "name" = "Frama-CI"; + "rev" = "8bb9694075309fb38c7d7cb28e831132de34ba04"; + "ref" = "feature/frama-clang-ci"; + }; + in + { + src = src; + compiled = pkgs.callPackage "${src}/compile.nix" { inherit pkgs; }; + } diff --git a/nix/frama-ci.sh b/nix/frama-ci.sh new file mode 100644 index 00000000..b331b057 --- /dev/null +++ b/nix/frama-ci.sh @@ -0,0 +1,12 @@ +#!/bin/sh -eu + +DIR=$(dirname $0) + +export FRAMA_CI_NIX=$DIR/frama-ci.nix + +export FRAMA_CI=$(nix-instantiate --eval -E "((import <nixos-19.03> {}).callPackage $FRAMA_CI_NIX { password = \"$TOKEN_FOR_API\";}).src.outPath") + +FRAMA_CI=${FRAMA_CI#\"} +FRAMA_CI=${FRAMA_CI%\"} + +$FRAMA_CI/compile.sh $@ -- GitLab