66
77 # source yarn.lock at the root of the repo
88 yarnLock = ../yarn.lock ;
9- in {
10- # Output a set of specifc shells
11- devShells = {
12- contracts = pkgs . callPackage ./shell.nix { inherit pkgs ; } ;
13- } ;
9+
10+ # Define packages first
11+ packages = rec {
12+ # Official TON Jetton contract in FunC
13+ contracts-jetton-func = pkgs . buildNpmPackage ( finalAttrs : rec {
14+ pname = "contracts-jetton-func" ;
15+
16+ src = pkgs . fetchgit {
17+ url = "https://github.com/ton-blockchain/jetton-contract.git" ;
18+ rev = "3d24b419f2ce49c09abf6b8703998187fe358ec9" ; # jetton-1.2, Jun 7, 2025
19+ hash = "sha256-jel0z/DsndlpnWuUhm4vzoacM/zboLCIqcPmPqBsDgU=" ;
20+ } ;
21+ version = ( builtins . fromJSON ( builtins . readFile "${ src } /package.json" ) ) . version ;
22+
23+ npmDepsHash = "sha256-EZtvTf19MjSKTWNir6pcP9XHwUIpE4ILSlhS+cQD/7w=" ;
24+
25+ meta = with pkgs . lib ; {
26+ description = "Reference implementation of Jetton (fungible token) smart contract for TON." ;
27+ license = licenses . mit ;
28+ changelog = "https://github.com/ton-blockchain/jetton-contract/releases/tag/jetton-1.2" ;
29+ } ;
30+ } ) ;
1431
15- # Output a set of specifc packages
16- packages = {
1732 # Chainlink contract pkgs
1833 contracts = pkgs . stdenv . mkDerivation ( finalAttrs : {
1934 inherit ( package-info ) version ;
4055 nodejs_24
4156 ] ;
4257
58+ buildInputs = [
59+ contracts-jetton-func
60+ ] ;
61+
4362 meta = with pkgs . lib ; {
4463 inherit ( package-info ) description ;
4564 license = licenses . mit ;
4665 # TODO: update to contracts project-specific tag
4766 changelog = "https://github.com/smartcontractkit/chainlink-ton/releases/tag/v${ version } " ;
4867 } ;
4968 } ) ;
50-
51- # Official TON Jetton contract in FunC
52- contracts-jetton-func = pkgs . buildNpmPackage ( finalAttrs : rec {
53- pname = "contracts-jetton-func" ;
54-
55- src = pkgs . fetchgit {
56- url = "https://github.com/ton-blockchain/jetton-contract.git" ;
57- rev = "3d24b419f2ce49c09abf6b8703998187fe358ec9" ; # jetton-1.2, Jun 7, 2025
58- hash = "sha256-jel0z/DsndlpnWuUhm4vzoacM/zboLCIqcPmPqBsDgU=" ;
59- } ;
60- version = ( builtins . fromJSON ( builtins . readFile "${ src } /package.json" ) ) . version ;
61-
62- npmDepsHash = "sha256-EZtvTf19MjSKTWNir6pcP9XHwUIpE4ILSlhS+cQD/7w=" ;
63-
64- meta = with pkgs . lib ; {
65- description = "Reference implementation of Jetton (fungible token) smart contract for TON." ;
66- license = licenses . mit ;
67- changelog = "https://github.com/ton-blockchain/jetton-contract/releases/tag/jetton-1.2" ;
68- } ;
69- } ) ;
7069 } ;
70+ in {
71+ # Output a set of specifc shells
72+ devShells = {
73+ contracts = pkgs . callPackage ./shell.nix { inherit pkgs ; jetton-contracts = packages . contracts-jetton-func ; } ;
74+ } ;
75+
76+ # Output a set of specifc packages
77+ inherit packages ;
7178}
0 commit comments