Merge pull request #251071 from mayl/odoo-fetchzip
This commit is contained in:
commit
18f081cbbf
|
@ -1,7 +1,7 @@
|
|||
{ stdenv
|
||||
, lib
|
||||
, fetchFromGitHub
|
||||
, fetchurl
|
||||
, fetchzip
|
||||
, python310
|
||||
, nodePackages
|
||||
, wkhtmltopdf
|
||||
|
@ -53,17 +53,12 @@ in python.pkgs.buildPythonApplication rec {
|
|||
format = "setuptools";
|
||||
|
||||
# latest release is at https://github.com/odoo/docker/blob/master/16.0/Dockerfile
|
||||
src = fetchurl {
|
||||
url = "https://nightly.odoo.com/${odoo_version}/nightly/src/odoo_${version}.tar.gz";
|
||||
src = fetchzip {
|
||||
url = "https://nightly.odoo.com/${odoo_version}/nightly/src/odoo_${version}.zip";
|
||||
name = "${pname}-${version}";
|
||||
hash = "sha256-DV5JBY+2gq5mUfcvN9S5xkd+ufgEBjvyvBY1X7pPFPk="; # odoo
|
||||
hash = "sha256-pSycpYSiqJ6DKENvCWwLz+JaPUXT5dmaq8x4Aency60="; # odoo
|
||||
};
|
||||
|
||||
unpackPhase = ''
|
||||
tar xfz $src
|
||||
cd odoo*
|
||||
'';
|
||||
|
||||
# needs some investigation
|
||||
doCheck = false;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ stdenv, lib, fetchFromGitHub, fetchurl, python310, nodePackages, wkhtmltopdf
|
||||
{ stdenv, lib, fetchFromGitHub, fetchzip, python310, nodePackages, wkhtmltopdf
|
||||
, nixosTests }:
|
||||
|
||||
let
|
||||
|
@ -38,7 +38,7 @@ let
|
|||
};
|
||||
|
||||
odoo_version = "15.0";
|
||||
odoo_release = "20230720";
|
||||
odoo_release = "20230816";
|
||||
in python.pkgs.buildPythonApplication rec {
|
||||
pname = "odoo15";
|
||||
version = "${odoo_version}.${odoo_release}";
|
||||
|
@ -46,18 +46,12 @@ in python.pkgs.buildPythonApplication rec {
|
|||
format = "setuptools";
|
||||
|
||||
# latest release is at https://github.com/odoo/docker/blob/master/15.0/Dockerfile
|
||||
src = fetchurl {
|
||||
url =
|
||||
"https://nightly.odoo.com/${odoo_version}/nightly/src/odoo_${version}.tar.gz";
|
||||
src = fetchzip {
|
||||
url = "https://nightly.odoo.com/${odoo_version}/nightly/src/odoo_${version}.zip";
|
||||
name = "${pname}-${version}";
|
||||
hash = "sha256-XH4cN2OrPvMjN3VcDJFxCacNxKkrN65jwhUN1dnGwgo="; # odoo
|
||||
hash = "sha256-h81JA0o44DVtl/bZ52rGQfg54TigwQcNpcMjQbi0zIQ="; # odoo
|
||||
};
|
||||
|
||||
unpackPhase = ''
|
||||
tar xfz $src
|
||||
cd odoo*
|
||||
'';
|
||||
|
||||
# needs some investigation
|
||||
doCheck = false;
|
||||
|
||||
|
@ -115,7 +109,6 @@ in python.pkgs.buildPythonApplication rec {
|
|||
dontStrip = true;
|
||||
|
||||
passthru = {
|
||||
updateScript = ./update.sh;
|
||||
tests = { inherit (nixosTests) odoo15; };
|
||||
};
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#!/usr/bin/env nix-shell
|
||||
#!nix-shell -i bash -p curl gnused nix coreutils
|
||||
#!nix-shell -i bash -p curl gnused nix coreutils nix-prefetch
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
DOCKER=$(curl -s https://raw.githubusercontent.com/odoo/docker/master/15.0/Dockerfile)
|
||||
DOCKER=$(curl -s https://raw.githubusercontent.com/odoo/docker/master/16.0/Dockerfile)
|
||||
|
||||
get_var() {
|
||||
echo "$DOCKER" | grep -E "^[A-Z][A-Z][A-Z] ODOO_$1" | sed -r "s|^[A-Z]{3} ODOO_$1.||g"
|
||||
|
@ -22,6 +22,6 @@ fi
|
|||
|
||||
cd "$(dirname "${BASH_SOURCE[0]}")"
|
||||
|
||||
sed -ri "s| hash.+ # odoo| hash = \"$(nix-prefetch-url --type sha256 "https://nightly.odoo.com/${VERSION}/nightly/src/odoo_${latestVersion}.tar.gz")\"; # odoo|g" default.nix
|
||||
sed -ri "s| hash.+ # odoo| hash = \"$(nix-prefetch -q fetchzip --url "https://nightly.odoo.com/${VERSION}/nightly/src/odoo_${latestVersion}.zip")\"; # odoo|g" default.nix
|
||||
sed -ri "s| odoo_version.+| odoo_version = \"$VERSION\";|" default.nix
|
||||
sed -ri "s| odoo_release.+| odoo_release = \"$RELEASE\";|" default.nix
|
||||
|
|
Loading…
Reference in a new issue