Fixed nixpkgs by generating a function by system.
This commit is contained in:
1 parent
52cad66083
commit
bff94c383a
2 files changed
+93
-26
No files matched your search
@@ -3,33 +3,39 @@
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs }: {
|
||||
writePythonApplication = {name, contentFile}: let
|
||||
wrappedScript = pkgs.writeText "wrappedScript" (builtins.readFile contentFile);
|
||||
in
|
||||
pkgs.writeShellApplication {
|
||||
name = name;
|
||||
runtimeInputs = [
|
||||
wrappedScript
|
||||
pkgs.python311];
|
||||
text = ''
|
||||
exec ${pkgs.python38}/bin/python ${wrappedScript} "$@"
|
||||
'';
|
||||
};
|
||||
outputs = { self, nixpkgs, flake-utils }:
|
||||
flake-utils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
pkgs = import nixpkgs { inherit system;};
|
||||
in
|
||||
{
|
||||
writePythonApplication = {name, contentFile}: let
|
||||
wrappedScript = pkgs.writeText "wrappedScript" (builtins.readFile contentFile);
|
||||
in
|
||||
pkgs.writeShellApplication {
|
||||
name = name;
|
||||
runtimeInputs = [
|
||||
wrappedScript
|
||||
pkgs.python311];
|
||||
text = ''
|
||||
exec ${pkgs.python38}/bin/python ${wrappedScript} "$@"
|
||||
'';
|
||||
};
|
||||
|
||||
writeBabashkaApplication = {name, contentFile}: let
|
||||
wrappedScript = pkgs.writeText "wrappedScript" (builtins.readFile contentFile);
|
||||
in
|
||||
pkgs.writeShellApplication {
|
||||
name = name;
|
||||
runtimeInputs = [
|
||||
wrappedScript
|
||||
pkgs.babashka];
|
||||
text = ''
|
||||
exec ${pkgs.babashka}/bin/bb ${wrappedScript} "$@"
|
||||
'';
|
||||
};
|
||||
};
|
||||
writeBabashkaApplication = {name, contentFile}: let
|
||||
wrappedScript = pkgs.writeText "wrappedScript" (builtins.readFile contentFile);
|
||||
in
|
||||
pkgs.writeShellApplication {
|
||||
name = name;
|
||||
runtimeInputs = [
|
||||
wrappedScript
|
||||
pkgs.babashka];
|
||||
text = ''
|
||||
exec ${pkgs.babashka}/bin/bb ${wrappedScript} "$@"
|
||||
'';
|
||||
};
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user