diff --git a/flake.nix b/flake.nix index 1b7d57b98..e8c45b14f 100644 --- a/flake.nix +++ b/flake.nix @@ -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 diff --git a/tools/nix-align.sh b/tools/nix-align.sh new file mode 100755 index 000000000..e0bbfde76 --- /dev/null +++ b/tools/nix-align.sh @@ -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