Merge pull request #1 from rigille/master

Fix build of kind-scm
This commit is contained in:
Victor Taelin 2023-04-12 19:42:33 -03:00 committed by GitHub
commit 5a6a5e2f2c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 43 additions and 144 deletions

1
bin/README.md Normal file
View File

@ -0,0 +1 @@
This folder contains various backends for Kind, `js` has the more mature javascript backend, `scm` has the scheme backend which won't stack overflow.

@ -1 +0,0 @@
Subproject commit bf49dfbd8c47c759bc2ac99978a0db02b2969578

23
bin/scm/README.md Normal file
View File

@ -0,0 +1,23 @@
The scheme backend is built with Nix! First install nix:
```bash
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install
```
Here's an example `shell.nix` which has `kind-scm` available to use:
```nix
{ pkgs ? import <nixpkgs> {} }:
let
kind_legacy = pkgs.fetchFromGitHub {
owner = "rigille";
repo = "Kind-Legacy";
rev = "2c5a96868296aeeed5260e9732ff7b052d0e9d43";
sha256 = "28c8325659e6d5883c604552e67470e09a59bd16156fa7f1e7e11623d36d62ad";
};
kind_scm = import "${kind_legacy}/bin/scm" { pkgs=pkgs; };
in
pkgs.mkShell {
buildInputs = [
kind_scm
];
}
```
Alternatively you can run `nix-env --file default.nix --install` and install `kind-scm` globally on your system.

@ -1 +0,0 @@
Subproject commit 937629ad6cdcec698f0b25d996bb9b01a3b7cce7

19
bin/scm/default.nix Normal file
View File

@ -0,0 +1,19 @@
{ pkgs ? import <nixpkgs> {} }:
pkgs.stdenv.mkDerivation {
name = "kind-scm";
src = ./.;
buildInputs = [
pkgs.chez
];
buildPhase = ''
cd src/
scheme compile.scm
cd ..
chmod +x bin/kind-scm
'';
installPhase = ''
mkdir -p $out/bin
mv bin/kind-scm $out/bin/kind-scm
'';
}

View File

@ -1,6 +0,0 @@
Package: kind-scm
Version: 1.0.93
Architecture: amd64
Maintainer: Rígille S. B. Menezes <rigillesbmenezes@protonmail.com>
Description: ChezScheme release of the kind programming language.
A minimal, efficient and practical proof and programming language. Under the hoods, it is basically Haskell, except purer and with dependent types. That means it can handle mathematical theorems just like Coq, Idris, Lean and Agda. On the surface, it aims to be more practical and looks more like TypeScript.

View File

@ -1,10 +0,0 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: kind-scm
Upstream-Contact: Rígille S. B. Menezes <rigillesbmenezes@protonmail.com>
Source: https://github.com/Kindelia/Kind
Files: *
Copyright: 2016-2019 Ethereum Foundation
2019-2021 Sunshine Cybernetics
2021, Victor Maia
License: MIT

View File

@ -1,42 +0,0 @@
{
"nodes": {
"flake-utils": {
"locked": {
"lastModified": 1629481132,
"narHash": "sha256-JHgasjPR0/J1J3DRm4KxM4zTyAj4IOJY8vIl75v/kPI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "997f7efcb746a9c140ce1f13c72263189225f482",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1630082507,
"narHash": "sha256-7JLwdUx4jFOfMFmamwEDGSe+jMOirpiUFRsFesjX0Us=",
"owner": "rigille",
"repo": "nixpkgs",
"rev": "fee7b9e40c04d563bc7c7a435ca047c6a1319de3",
"type": "github"
},
"original": {
"owner": "rigille",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

View File

@ -1,84 +0,0 @@
{
description = "A modern proof language";
inputs.nixpkgs.url = "github:rigille/nixpkgs";
inputs.flake-utils.url = "github:numtide/flake-utils";
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
version = "1.0.104";
in
{
packages.kind-scm =
pkgs.stdenv.mkDerivation {
pname = "kind-scm";
version = version;
src = self;
buildInputs = [ pkgs.chez-racket pkgs.chez-exe pkgs.libuuid ];
buildPhase = ''
cd bin/scm
make
'';
installPhase = ''
mkdir -p $out
make install PREFIX=$out
'';
doCheck = false;
};
packages.kind-scm-deb =
pkgs.stdenv.mkDerivation {
pname = "kind-scm-deb";
version = version;
src = self;
buildInputs = [ pkgs.chez-racket pkgs.chez-exe pkgs.libuuid pkgs.dpkg ];
buildPhase = ''
cd bin/scm
make deb
'';
installPhase = ''
mkdir -p $out
cp bin/kind-scm_1.0.1-0_amd64.deb $out
'';
doCheck = false;
};
/*packages.kind-js =
pkgs.stdenv.mkDerivation {
pname = "kind-js";
version = version;
src = self;
buildInputs = [ pkgs.nodejs-16_x ];
buildPhase = ''
cd bin
npm i
node bootstrap.js
'';
doCheck = false;
};
devShell.mkShell {
buildInputs = [
pkgs.chez-racket
pkgs.chez-exe
pkgs.libuuid
];
};*/
});
}