diff options
author | Bjørn Forsman <bjorn.forsman@gmail.com> | 2014-12-07 15:01:47 +0100 |
---|---|---|
committer | Bjørn Forsman <bjorn.forsman@gmail.com> | 2015-01-18 15:24:30 +0100 |
commit | 0e3007ec886948889bc634a88b3396b4ed01e7ee (patch) | |
tree | a43d2ed08d9d7941d8532d83d1fb9446a93974e9 /pkgs/applications/audio/ardour | |
parent | 412cb5a3a2415fa0343f5689c9f42a87548c7b35 (diff) | |
download | nixpkgs-0e3007ec886948889bc634a88b3396b4ed01e7ee.tar nixpkgs-0e3007ec886948889bc634a88b3396b4ed01e7ee.tar.gz nixpkgs-0e3007ec886948889bc634a88b3396b4ed01e7ee.tar.bz2 nixpkgs-0e3007ec886948889bc634a88b3396b4ed01e7ee.tar.lz nixpkgs-0e3007ec886948889bc634a88b3396b4ed01e7ee.tar.xz nixpkgs-0e3007ec886948889bc634a88b3396b4ed01e7ee.tar.zst nixpkgs-0e3007ec886948889bc634a88b3396b4ed01e7ee.zip |
ardour: report correct version number
Even though we build from git tag 3.5.403, `ardour --version` reports 3.5-380-g2f6065b. Fix it. (Another way to fix this is to clone the whole git repo, preserve the .git/ directory and add git as buildInput so that Ardour can figure out all this version info stuff by itself.)
Diffstat (limited to 'pkgs/applications/audio/ardour')
-rw-r--r-- | pkgs/applications/audio/ardour/default.nix | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/pkgs/applications/audio/ardour/default.nix b/pkgs/applications/audio/ardour/default.nix index 5180be3c940..3142b2c52fc 100644 --- a/pkgs/applications/audio/ardour/default.nix +++ b/pkgs/applications/audio/ardour/default.nix @@ -6,7 +6,21 @@ , perl, pkgconfig, python, serd, sord, sratom, suil }: let + + # Ardour git repo uses a mix of annotated and lightweight tags. Annotated + # tags are used for MAJOR.MINOR versioning, and lightweight tags are used + # in-between; MAJOR.MINOR.REV where REV is the number of commits since the + # last annotated tag. A slightly different version string format is needed + # for the 'revision' info that is built into the binary; it is the format of + # "git describe" when _not_ on an annotated tag(!): MAJOR.MINOR-REV-HASH. + + # Version to build. tag = "3.5.403"; + + # Version info that is built into the binary. Keep in sync with 'tag'. The + # last 8 digits is a (fake) commit id. + revision = "3.5-403-00000000"; + in stdenv.mkDerivation rec { @@ -15,7 +29,7 @@ stdenv.mkDerivation rec { src = fetchgit { url = git://git.ardour.org/ardour/ardour.git; rev = "refs/tags/${tag}"; - sha256 = "7d7c8e2c7ccccca6c8324fd874509e1b0d89f3f42cb92982c50d212797463f4c"; + sha256 = "0k1z8sbjf88dqn12kf9cykrqj38vkr879n2g6b4adk6cghn8wz3x"; }; buildInputs = @@ -27,10 +41,7 @@ stdenv.mkDerivation rec { ]; patchPhase = '' - # The funny revision number is from `git describe rev` - printf '#include "libs/ardour/ardour/revision.h"\nnamespace ARDOUR { const char* revision = \"${tag}-g2f6065b\"; }\n' > libs/ardour/revision.cc - # Note the different version number - sed -i '33i rev = \"3.5-380-g2f6065b\"' wscript + printf '#include "libs/ardour/ardour/revision.h"\nnamespace ARDOUR { const char* revision = \"${revision}\"; }\n' > libs/ardour/revision.cc sed 's|/usr/include/libintl.h|${glibc}/include/libintl.h|' -i wscript sed -e 's|^#!/usr/bin/perl.*$|#!${perl}/bin/perl|g' -i tools/fmt-bindings sed -e 's|^#!/usr/bin/env.*$|#!${perl}/bin/perl|g' -i tools/*.pl |