• R/O
  • HTTP
  • SSH
  • HTTPS

コミット

タグ
未設定

よく使われているワード(クリックで追加)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

A categorical programming language


コミットメタ情報

リビジョン647dff389c3c5a8e7a21847cbccb934ac2289560 (tree)
日時2024-10-01 02:24:20
作者Corbin <cds@corb...>
コミッターCorbin

ログメッセージ

Use rpypkgs.

変更サマリ

差分

--- a/flake.lock
+++ b/flake.lock
@@ -20,16 +20,16 @@
2020 },
2121 "nixpkgs": {
2222 "locked": {
23- "lastModified": 1682303062,
24- "narHash": "sha256-x+KAADp27lbxeoPXLUMxKcRsUUHDlg+qVjt5PjgBw9A=",
23+ "lastModified": 1727540905,
24+ "narHash": "sha256-40J9tW7Y794J7Uw4GwcAKlMxlX2xISBl6IBigo83ih8=",
2525 "owner": "NixOS",
2626 "repo": "nixpkgs",
27- "rev": "f5364316e314436f6b9c8fd50592b18920ab18f9",
27+ "rev": "fbca5e745367ae7632731639de5c21f29c8744ed",
2828 "type": "github"
2929 },
3030 "original": {
3131 "owner": "NixOS",
32- "ref": "nixos-22.11",
32+ "ref": "nixos-24.05",
3333 "repo": "nixpkgs",
3434 "type": "github"
3535 }
@@ -52,17 +52,17 @@
5252 ]
5353 },
5454 "locked": {
55- "lastModified": 1713582112,
56- "narHash": "sha256-/ceQxM6T0G1hH+mnvvkYEarhkKVTTfRun8xJduGvnLY=",
57- "ref": "refs/heads/master",
58- "rev": "80c99cc8a914a06c83177bc3ae6ddf2432b6175f",
59- "revCount": 30,
60- "type": "git",
61- "url": "git://git.pf.osdn.net/gitroot/c/co/corbin/rpypkgs.git"
55+ "lastModified": 1723911733,
56+ "narHash": "sha256-WtRxxafvuO+jIK/kKgr5gcnWOFt1QrpqGDlR/C1s97c=",
57+ "owner": "rpypkgs",
58+ "repo": "rpypkgs",
59+ "rev": "1b4340ccbe2ddcca1feaa83ea61f5221407e7542",
60+ "type": "github"
6261 },
6362 "original": {
64- "type": "git",
65- "url": "git://git.pf.osdn.net/gitroot/c/co/corbin/rpypkgs.git"
63+ "owner": "rpypkgs",
64+ "repo": "rpypkgs",
65+ "type": "github"
6666 }
6767 },
6868 "systems": {
--- a/flake.nix
+++ b/flake.nix
@@ -1,7 +1,7 @@
11 {
22 description = "Reference toolchain for Cammy";
33 inputs = {
4- nixpkgs.url = "github:NixOS/nixpkgs/nixos-22.11";
4+ nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
55 flake-utils.url = "github:numtide/flake-utils";
66 zaha = {
77 url = "github:mostawesomedude/zaha";
@@ -11,7 +11,7 @@
1111 };
1212 };
1313 rpypkgs = {
14- url = "git://git.pf.osdn.net/gitroot/c/co/corbin/rpypkgs.git";
14+ url = "github:rpypkgs/rpypkgs";
1515 inputs = {
1616 nixpkgs.follows = "nixpkgs";
1717 flake-utils.follows = "flake-utils";
@@ -26,7 +26,10 @@
2626 };
2727 schemata = ./schemata;
2828 jelly = import ./jelly { inherit pkgs; };
29- sampler = import ./sampler { inherit pkgs; };
29+ sampler = import ./sampler {
30+ inherit pkgs;
31+ inherit (rpypkgs.lib.${system}) mkRPythonDerivation;
32+ };
3033 bk = import ./bk { inherit pkgs schemata; };
3134 cammy = pkgs.stdenv.mkDerivation {
3235 name = "cammy";
@@ -52,7 +55,7 @@
5255 # cp -R hive/ $lib/lib/cammy/
5356 '';
5457 };
55- py = pkgs.python39.withPackages (ps: [
58+ py = pkgs.python311.withPackages (ps: [
5659 # maintaining cammy-rpy/
5760 ps.pyflakes
5861 # Honey
--- a/sampler/default.nix
+++ b/sampler/default.nix
@@ -1,56 +1,15 @@
1-{ pkgs ? import <nixpkgs> {} }:
2-let
3- inherit (pkgs)
4- fetchhg stdenv
5- pkg-config libffi stb libcaca
6- python2 python2Packages;
7- # https://foss.heptapod.net/pypy/pypy/
8- pypySrc = fetchhg {
9- url = "https://foss.heptapod.net/pypy/pypy";
10- # tag release-pypy3.8-v7.3.11
11- rev = "release-pypy3.8-v7.3.11";
12- sha256 = "sha256-yHIY4cuCpfB0Nl1Odutc9w2QUPhWK+rxaSGfbBV+ZUg=";
13- };
14-in
15- let
16- opt = if false then "jit" else "2";
17- in stdenv.mkDerivation {
18- name = "sampler";
1+{ pkgs, mkRPythonDerivation }:
2+mkRPythonDerivation {
3+ entrypoint = "main.py";
4+ binName = "cammy-sample";
5+ optLevel = "2";
6+} {
7+ pname = "sampler";
8+ version = "2024";
199
20- # src = builtins.filterSource
21- # (path: type: baseNameOf path == ./main.py
22- # || builtins.match ".*cammylib.*" path != null)
23- # ./.;
24- srcs = builtins.filterSource
25- (path: type: type == "directory"
26- || builtins.match ".*\.py" (baseNameOf path) != null)
27- ./.;
10+ src = ./.;
2811
29- buildInputs = [
30- # always required
31- pkg-config stb libcaca
32- python2 python2Packages.py
33- # only required for JIT
34- python2Packages.pytest libffi
35- ];
36-
37- prePatch = ''
38- mkdir -p ./rpython/_cache
39- cp -r ${pypySrc}/rpython .
40- chmod -R u+w rpython/
41- '';
42-
43- buildPhase = ''
44- source $stdenv/setup
45- # Do the actual translation.
46- ${python2}/bin/python2 -mrpython -O${opt} ./main.py
47- '';
48-
49- installPhase = ''
50- mkdir -p $out/bin/
51- cp ./cammy-sample $out/bin/
52- '';
53-
54- separateDebugInfo = true;
55- }
12+ buildInputs = with pkgs; [ stb libcaca ];
5613
14+ separateDebugInfo = true;
15+}