Add submodule alignment stub helper script

This commit is contained in:
Thibault Lemaire 2023-03-23 12:07:50 +01:00
parent 5efb9d099e
commit 201e5b1d98
2 changed files with 21 additions and 0 deletions

View file

@ -30,6 +30,16 @@
outputs = { self, nixpkgs, linphone-sdk, ispell-src, ... }: {
overlays.default = final: prev: {
chore = {
update-from-submodules = prev.stdenv.mkDerivation rec {
name = "update-from-submodules";
src = ./tools/nix-align.sh;
unpackPhase = "true";
buildPhase = "true";
installPhase = "mkdir -p $out/bin; cp $src $out/bin/$name";
};
};
linphone = prev.linphone.overrideAttrs (attrs:
let overriddenSrc = linphone-sdk.nixUtils.overrideSource self; in

11
tools/nix-align.sh Executable file
View file

@ -0,0 +1,11 @@
#!/usr/bin/env bash
# Copyright (C) 2010-2023 Belledonne Communications SARL
# SPDX-License-Identifier: AGPL-3.0-or-later
#
# Small helper script to align nix with submodules
set -euxo pipefail
git describe
nix flake update
nix build