mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-18 02:05:51 +03:00
sqlite{,-analyzer}: add archiveVersion function
This commit is contained in:
parent
25ec13a4f0
commit
5580765158
@ -1,11 +1,15 @@
|
||||
{ stdenv, fetchurl, unzip, sqlite, tcl }:
|
||||
|
||||
let
|
||||
archiveVersion = import ./archive-version.nix stdenv.lib;
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "sqlite-analyzer-${version}";
|
||||
version = "3.23.1";
|
||||
|
||||
src = assert version == sqlite.version; fetchurl {
|
||||
url = https://sqlite.org/2018/sqlite-src-3230100.zip;
|
||||
url = "https://sqlite.org/2018/sqlite-src-${archiveVersion version}.zip";
|
||||
sha256 = "1z3xr8d8ds4l8ndkg34cii13d0w790nlxdkrw6virinqi7wmmd1d";
|
||||
};
|
||||
|
||||
|
11
pkgs/development/libraries/sqlite/archive-version.nix
Normal file
11
pkgs/development/libraries/sqlite/archive-version.nix
Normal file
@ -0,0 +1,11 @@
|
||||
lib: version:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
fragments = splitString "." version;
|
||||
major = head fragments;
|
||||
minor = concatMapStrings (fixedWidthNumber 2) (tail fragments);
|
||||
in
|
||||
|
||||
major + minor + "00"
|
@ -4,13 +4,17 @@ assert interactive -> readline != null && ncurses != null;
|
||||
|
||||
with stdenv.lib;
|
||||
|
||||
let
|
||||
archiveVersion = import ./archive-version.nix stdenv.lib;
|
||||
in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "sqlite-${version}";
|
||||
version = "3.23.1";
|
||||
|
||||
# NB! Make sure to update analyzer.nix src (in the same directory).
|
||||
src = fetchurl {
|
||||
url = https://sqlite.org/2018/sqlite-autoconf-3230100.tar.gz;
|
||||
url = "https://sqlite.org/2018/sqlite-autoconf-${archiveVersion version}.tar.gz";
|
||||
sha256 = "09ggapjhqjb2pzk0wkfczil77plijg3d77m2bpzlwx2y7ql2p14j";
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user