resholve: selectively enable python27

This commit is contained in:
Travis A. Everett 2022-12-01 17:10:14 -06:00
parent 5bb01fc844
commit 02b7967806
4 changed files with 22 additions and 10 deletions

View File

@ -1,8 +1,19 @@
{ callPackage
{ lib
, pkgsBuildHost
, system
, ...
}:
let
pkgs = import ../../../.. {
inherit system;
# Allow python27 with known security issues only for resholve,
# see issue #201859 for the reasoning
# In resholve case this should not be a security issue,
# since it will only be used during build, not runtime
config.permittedInsecurePackages = [ pkgsBuildHost.python27.name ];
};
callPackage = lib.callPackageWith pkgs;
source = callPackage ./source.nix { };
deps = callPackage ./deps.nix { };
in

View File

@ -1,4 +1,5 @@
{ callPackage
, python27
, ...
}:
@ -14,5 +15,5 @@
rec {
# binlore = callPackage ./binlore.nix { };
oil = callPackage ./oildev.nix { };
oil = callPackage ./oildev.nix { inherit python27; };
}

View File

@ -1,6 +1,6 @@
{ lib
, stdenv
, python27Packages
, python27
, callPackage
, fetchFromGitHub
, makeWrapper
@ -32,7 +32,7 @@ rec {
'';
};
py-yajl = python27Packages.buildPythonPackage rec {
py-yajl = python27.pkgs.buildPythonPackage rec {
pname = "oil-pyyajl-unstable";
version = "2019-12-05";
src = fetchFromGitHub {
@ -51,7 +51,7 @@ rec {
(or accepting all of the patches we need to do so).
This creates one without disturbing upstream too much.
*/
oildev = python27Packages.buildPythonPackage rec {
oildev = python27.pkgs.buildPythonPackage rec {
pname = "oildev-unstable";
version = "2021-07-14";
@ -95,7 +95,7 @@ rec {
nativeBuildInputs = [ re2c file makeWrapper ];
propagatedBuildInputs = with python27Packages; [ six typing ];
propagatedBuildInputs = with python27.pkgs; [ six typing ];
doCheck = true;

View File

@ -1,7 +1,7 @@
{ lib
, stdenv
, callPackage
, python27Packages
, python27
, installShellFiles
, rSrc
, version
@ -10,7 +10,7 @@
, resholve-utils
}:
python27Packages.buildPythonApplication {
python27.pkgs.buildPythonApplication {
pname = "resholve";
inherit version;
src = rSrc;
@ -19,7 +19,7 @@ python27Packages.buildPythonApplication {
propagatedBuildInputs = [
oildev
python27Packages.configargparse
python27.pkgs.configargparse
];
postPatch = ''
@ -40,7 +40,7 @@ python27Packages.buildPythonApplication {
passthru = {
inherit (resholve-utils) mkDerivation phraseSolution writeScript writeScriptBin;
tests = callPackage ./test.nix { inherit rSrc binlore; };
tests = callPackage ./test.nix { inherit rSrc binlore python27; };
};
meta = with lib; {