From dc6d1ec67ea7af4e509c171852620befb9184441 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Tue, 23 Feb 2010 23:24:49 +0000 Subject: --- release.nix | 27 ++------------------------- 1 file changed, 2 insertions(+), 25 deletions(-) (limited to 'release.nix') diff --git a/release.nix b/release.nix index e9afe9c9e6cf..f5b0f3563d7a 100644 --- a/release.nix +++ b/release.nix @@ -77,34 +77,11 @@ let configureFlags = '' --disable-init-state - --with-aterm=${aterm} --with-bzip2=${bzip2} + --with-aterm=${aterm} --with-bzip2=${bzip2} --with-sqlite=${sqlite} ''; }; - /* - static = - { tarball ? jobs.tarball {} - , system ? "i686-linux" - }: - - with import nixpkgs {inherit system;}; - - releaseTools.binaryTarball { - name = "nix-static-tarball"; - src = tarball; - - buildInputs = [curl perl bzip2]; - - configureFlags = '' - --disable-init-state - --with-aterm=${aterm} --with-bzip2=${bzip2} - --enable-static-nix - ''; - }; - */ - - coverage = { tarball ? jobs.tarball {} }: @@ -123,7 +100,7 @@ let configureFlags = '' --disable-init-state --disable-shared - --with-aterm=${aterm} --with-bzip2=${bzip2} + --with-aterm=${aterm} --with-bzip2=${bzip2} --with-sqlite=${sqlite} ''; lcovFilter = ["*/boost/*" "*-tab.*"]; -- cgit 1.4.1 From 8520de4720a798701a41b6ab3e6cf8d6cc71caa3 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 24 Feb 2010 10:48:57 +0000 Subject: * Include the sqlite tarball in the Nix tarball. --- externals/Makefile.am | 54 +++++++++++++++++++++++++++++++++++++-------------- release.nix | 3 +++ 2 files changed, 42 insertions(+), 15 deletions(-) (limited to 'release.nix') diff --git a/externals/Makefile.am b/externals/Makefile.am index c9bc05d71ee5..3a0b776098e1 100644 --- a/externals/Makefile.am +++ b/externals/Makefile.am @@ -14,14 +14,10 @@ $(ATERM): $(ATERM).tar.gz patch -d $(ATERM) -p1 < ./max-long.patch patch -d $(ATERM) -p1 < ./sizeof.patch -have-aterm: - $(MAKE) $(ATERM) - touch have-aterm - if HAVE_ATERM build-aterm: else -build-aterm: have-aterm +build-aterm: $(ATERM) (pfx=`pwd` && \ cd $(ATERM) && \ CC="$(CC)" ./configure --prefix=$$pfx/inst-aterm \ @@ -47,14 +43,10 @@ $(BZIP2).tar.gz: $(BZIP2): $(BZIP2).tar.gz gunzip < $(srcdir)/$(BZIP2).tar.gz | tar xvf - -have-bzip2: - $(MAKE) $(BZIP2) - touch have-bzip2 - if HAVE_BZIP2 build-bzip2: else -build-bzip2: have-bzip2 +build-bzip2: $(BZIP2) (pfx=`pwd` && \ cd $(BZIP2) && \ $(MAKE) && \ @@ -67,10 +59,42 @@ install: endif -all: build-aterm build-bzip2 +# SQLite + +SQLITE_VERSION = 3.6.22 +SQLITE = sqlite-$(SQLITE_VERSION) +SQLITE_TAR = sqlite-amalgamation-$(SQLITE_VERSION).tar.gz + +$(SQLITE_TAR): + @echo "Nix requires the SQLite library to build." + @echo "Please download version $(SQLITE_VERSION) from" + @echo " http://www.sqlite.org/$(SQLITE_TAR)" + @echo "and place it in the externals/ directory." + false + +$(SQLITE): $(SQLITE_TAR) + gzip -d < $(srcdir)/$(SQLITE_TAR) | tar xvf - + +if HAVE_SQLITE +build-sqlite: +else +build-sqlite: $(SQLITE) + (pfx=`pwd` && \ + cd $(SQLITE) && \ + CC="$(CC)" ./configure --prefix=$$pfx/inst-sqlite \ + --disable-shared --enable-static && \ + $(MAKE) && \ + $(MAKE) check && \ + $(MAKE) install) + touch build-sqlite +endif + + +all: build-aterm build-bzip2 build-sqlite -EXTRA_DIST = $(ATERM).tar.gz $(BZIP2).tar.gz max-long.patch sizeof.patch +EXTRA_DIST = $(ATERM).tar.gz $(BZIP2).tar.gz $(SQLITE_TAR) max-long.patch sizeof.patch -ext-clean: - $(RM) -f have-aterm build-aterm have-bzip2 build-bzip2 - $(RM) -rf $(ATERM) $(BZIP2) +clean: + $(RM) -f build-aterm build-bzip2 build-sqlite + $(RM) -rf $(ATERM) $(BZIP2) $(SQLITE) + $(RM) -rf inst-aterm inst-bzip2 inst-sqlite diff --git a/release.nix b/release.nix index f5b0f3563d7a..0de1b7bb2ff9 100644 --- a/release.nix +++ b/release.nix @@ -37,6 +37,9 @@ let stripHash ${bzip2.src} cp -pv ${bzip2.src} externals/$strippedName + stripHash ${sqlite.src} + cp -pv ${sqlite.src} externals/$strippedName + # TeX needs a writable font cache. export VARTEXFONTS=$TMPDIR/texfonts ''; -- cgit 1.4.1 From 03afc34805c0dbd5f354b823cb8391fed99c6539 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 10 Mar 2010 13:07:37 +0000 Subject: * Simplify. --- release.nix | 42 ++++++++++++++++-------------------------- 1 file changed, 16 insertions(+), 26 deletions(-) (limited to 'release.nix') diff --git a/release.nix b/release.nix index 0de1b7bb2ff9..0ca838a07da4 100644 --- a/release.nix +++ b/release.nix @@ -1,4 +1,7 @@ -{ nixpkgs ? ../nixpkgs }: +{ nix ? {outPath = ./.; rev = 1234;} +, nixpkgs ? ../nixpkgs +, officialRelease ? false +}: let @@ -6,10 +9,6 @@ let tarball = - { nix ? {outPath = ./.; rev = 1234;} - , officialRelease ? false - }: - with import nixpkgs {}; releaseTools.sourceTarball { @@ -66,9 +65,7 @@ let build = - { tarball ? jobs.tarball {} - , system ? "i686-linux" - }: + { system ? "i686-linux" }: with import nixpkgs {inherit system;}; @@ -76,7 +73,7 @@ let name = "nix"; src = tarball; - buildInputs = [curl perl bzip2 openssl]; + buildInputs = [ curl perl bzip2 openssl ]; configureFlags = '' --disable-init-state @@ -86,27 +83,24 @@ let coverage = - { tarball ? jobs.tarball {} - }: - with import nixpkgs {}; releaseTools.coverageAnalysis { name = "nix-build"; src = tarball; - buildInputs = [ - curl perl bzip2 openssl - # These are for "make check" only: - graphviz libxml2 libxslt - ]; + buildInputs = + [ curl perl bzip2 openssl + # These are for "make check" only: + graphviz libxml2 libxslt + ]; configureFlags = '' --disable-init-state --disable-shared --with-aterm=${aterm} --with-bzip2=${bzip2} --with-sqlite=${sqlite} ''; - lcovFilter = ["*/boost/*" "*-tab.*"]; + lcovFilter = [ "*/boost/*" "*-tab.*" ]; # We call `dot', and even though we just use it to # syntax-check generated dot files, it still requires some @@ -151,17 +145,15 @@ let makeRPM = system: diskImageFun: prio: - { tarball ? jobs.tarball {} - }: with import nixpkgs {inherit system;}; releaseTools.rpmBuild rec { name = "nix-rpm-${diskImage.name}"; - src = tarball; + src = jobs.tarball; diskImage = diskImageFun vmTools.diskImages; memSize = 1024; - meta = { schedulingPriority = toString prio; }; + meta.schedulingPriority = prio; }; @@ -170,17 +162,15 @@ let makeDeb = system: diskImageFun: prio: - { tarball ? jobs.tarball {} - }: with import nixpkgs {inherit system;}; releaseTools.debBuild { name = "nix-deb"; - src = tarball; + src = jobs.tarball; diskImage = diskImageFun vmTools.diskImages; memSize = 1024; - meta = { schedulingPriority = toString prio; }; + meta.schedulingPriority = prio; configureFlags = "--sysconfdir=/etc"; debRequires = ["curl"]; }; -- cgit 1.4.1