From 6c4daf4a0f7b56cbc5a049e4c3e175b6146f0184 Mon Sep 17 00:00:00 2001 From: comavius Date: Sun, 1 Dec 2024 16:29:57 +0900 Subject: [PATCH 1/3] =?UTF-8?q?=E2=9C=A8=20util=20for=20simple=20binary?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- exec-container/flake.nix | 1 + exec-container/utils/default.nix | 4 ++++ 2 files changed, 5 insertions(+) create mode 100644 exec-container/utils/default.nix diff --git a/exec-container/flake.nix b/exec-container/flake.nix index 95c539f..c8a0868 100644 --- a/exec-container/flake.nix +++ b/exec-container/flake.nix @@ -71,6 +71,7 @@ }) (final: prev: { toj-helper = toj-helper.packages.${system}.default; + toj-utils = import ./utils {inherit pkgs;}; }) ]; }; diff --git a/exec-container/utils/default.nix b/exec-container/utils/default.nix new file mode 100644 index 0000000..a3ea2c6 --- /dev/null +++ b/exec-container/utils/default.nix @@ -0,0 +1,4 @@ +{pkgs, ...}: { + simple-bin = {package, bin-name}: + pkgs.writeShellScriptBin bin-name "exec ${package}/bin/${bin-name} $@"; +} From 80ec9bb25fc53b07f04d4d21836b1ac119b80dab Mon Sep 17 00:00:00 2001 From: comavius Date: Sun, 1 Dec 2024 16:30:05 +0900 Subject: [PATCH 2/3] =?UTF-8?q?=E2=9C=A8=20cobol?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- exec-container/compilers/cobol/default.nix | 4 ++++ exec-container/compilers/default.nix | 2 ++ 2 files changed, 6 insertions(+) create mode 100644 exec-container/compilers/cobol/default.nix diff --git a/exec-container/compilers/cobol/default.nix b/exec-container/compilers/cobol/default.nix new file mode 100644 index 0000000..e0f3c30 --- /dev/null +++ b/exec-container/compilers/cobol/default.nix @@ -0,0 +1,4 @@ +{pkgs}: pkgs.toj-utils.simple-bin { + package = pkgs.gnucobol; + bin-name = "cobc"; +} diff --git a/exec-container/compilers/default.nix b/exec-container/compilers/default.nix index de101be..0a95f91 100644 --- a/exec-container/compilers/default.nix +++ b/exec-container/compilers/default.nix @@ -3,11 +3,13 @@ brainfuck = import ./brainfuck {inherit pkgs;}; rust = import ./rust {inherit pkgs;}; koka = import ./koka {inherit pkgs;}; + cobol = import ./cobol {inherit pkgs;}; in { all = [ golang brainfuck rust koka + cobol ]; } From c8c9b91a7800b765f3d6a13e397729de61109c49 Mon Sep 17 00:00:00 2001 From: comavius Date: Sun, 1 Dec 2024 16:31:14 +0900 Subject: [PATCH 3/3] =?UTF-8?q?=F0=9F=8E=A8=20nix=20fmt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- exec-container/compilers/cobol/default.nix | 3 ++- exec-container/utils/default.nix | 7 +++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/exec-container/compilers/cobol/default.nix b/exec-container/compilers/cobol/default.nix index e0f3c30..7e2db06 100644 --- a/exec-container/compilers/cobol/default.nix +++ b/exec-container/compilers/cobol/default.nix @@ -1,4 +1,5 @@ -{pkgs}: pkgs.toj-utils.simple-bin { +{pkgs}: +pkgs.toj-utils.simple-bin { package = pkgs.gnucobol; bin-name = "cobc"; } diff --git a/exec-container/utils/default.nix b/exec-container/utils/default.nix index a3ea2c6..3515717 100644 --- a/exec-container/utils/default.nix +++ b/exec-container/utils/default.nix @@ -1,4 +1,7 @@ {pkgs, ...}: { - simple-bin = {package, bin-name}: - pkgs.writeShellScriptBin bin-name "exec ${package}/bin/${bin-name} $@"; + simple-bin = { + package, + bin-name, + }: + pkgs.writeShellScriptBin bin-name "exec ${package}/bin/${bin-name} $@"; }