diff --git a/pkgs/misc/linuxwacom/default.nix b/pkgs/misc/linuxwacom/default.nix index 3a27e12eb3b3..9e1e7186db71 100644 --- a/pkgs/misc/linuxwacom/default.nix +++ b/pkgs/misc/linuxwacom/default.nix @@ -1,12 +1,14 @@ { stdenv, fetchurl, libX11, libXi, inputproto , xproto, ncurses, pkgconfig, xorgserver }: +let s = import ./src-for-default.nix; in + stdenv.mkDerivation rec { - name = "linuxwacom-0.8.4-1"; + inherit (s) name; src = fetchurl { - url = "mirror://sourceforge/linuxwacom/${name}.tar.bz2"; - sha256 = "1gfsjm9i1c8d0w0g8v9q3xfrpxsmmsc9qlidr5mkwidr070cphz9"; + url = s.url; + sha256 = s.hash; }; buildInputs = [ libX11 libXi inputproto xproto ncurses pkgconfig xorgserver ]; diff --git a/pkgs/misc/linuxwacom/src-for-default.nix b/pkgs/misc/linuxwacom/src-for-default.nix new file mode 100644 index 000000000000..6563f794fbd7 --- /dev/null +++ b/pkgs/misc/linuxwacom/src-for-default.nix @@ -0,0 +1,9 @@ +rec { + version="0.8.4-2"; + name="linuxwacom-0.8.4-2"; + hash="0czsmg4danh0ia784nrv4cifvs6wn1dw0mbs6l1ln0w2mvxxkgz0"; + url="http://downloads.sourceforge.net/linuxwacom/files/linuxwacom/${version}/linuxwacom-${version}.tar.bz2"; + advertisedUrl="http://downloads.sourceforge.net/linuxwacom/files/linuxwacom/0.8.4-2/linuxwacom-0.8.4-2.tar.bz2"; + + +} diff --git a/pkgs/misc/linuxwacom/src-info-for-default.nix b/pkgs/misc/linuxwacom/src-info-for-default.nix new file mode 100644 index 000000000000..97c59501debf --- /dev/null +++ b/pkgs/misc/linuxwacom/src-info-for-default.nix @@ -0,0 +1,7 @@ +{ + downloadPage = "http://sourceforge.net/projects/linuxwacom/files/"; + baseName = "linuxwacom"; + choiceCommand = ''head -1 | sed -re "$skipRedirectSF"''; + versionExtractorSedScript = "\$extractReleaseSF"; + versionReferenceCreator = "\$(replaceAllVersionOccurences)"; +}