|
|
|
@ -13,11 +13,11 @@ with writers; |
|
|
|
|
let |
|
|
|
|
|
|
|
|
|
bin = { |
|
|
|
|
bash = writeBashBin "test_writers_bash_bin" '' |
|
|
|
|
bash = writeBashBin "test-writers-bash-bin" '' |
|
|
|
|
if [[ "test" == "test" ]]; then echo "success"; fi |
|
|
|
|
''; |
|
|
|
|
|
|
|
|
|
c = writeCBin "test_writers_c" { libraries = [ ]; } '' |
|
|
|
|
c = writeCBin "test-writers-c" { libraries = [ ]; } '' |
|
|
|
|
#include <stdio.h> |
|
|
|
|
int main() { |
|
|
|
|
printf("success\n"); |
|
|
|
@ -25,17 +25,17 @@ let |
|
|
|
|
} |
|
|
|
|
''; |
|
|
|
|
|
|
|
|
|
dash = writeDashBin "test_writers_dash_bin" '' |
|
|
|
|
dash = writeDashBin "test-writers-dash-bin" '' |
|
|
|
|
test '~' = '~' && echo 'success' |
|
|
|
|
''; |
|
|
|
|
|
|
|
|
|
rust = writeRustBin "test_writers_rust_bin" {} '' |
|
|
|
|
rust = writeRustBin "test-writers-rust-bin" {} '' |
|
|
|
|
fn main(){ |
|
|
|
|
println!("success") |
|
|
|
|
} |
|
|
|
|
''; |
|
|
|
|
|
|
|
|
|
haskell = writeHaskellBin "test_writers_haskell_bin" { libraries = [ haskellPackages.acme-default ]; } '' |
|
|
|
|
haskell = writeHaskellBin "test-writers-haskell-bin" { libraries = [ haskellPackages.acme-default ]; } '' |
|
|
|
|
import Data.Default |
|
|
|
|
|
|
|
|
|
int :: Int |
|
|
|
@ -47,7 +47,7 @@ let |
|
|
|
|
_ -> print "fail" |
|
|
|
|
''; |
|
|
|
|
|
|
|
|
|
js = writeJSBin "test_writers_js_bin" { libraries = [ nodePackages.semver ]; } '' |
|
|
|
|
js = writeJSBin "test-writers-js-bin" { libraries = [ nodePackages.semver ]; } '' |
|
|
|
|
var semver = require('semver'); |
|
|
|
|
|
|
|
|
|
if (semver.valid('1.2.3')) { |
|
|
|
@ -57,12 +57,12 @@ let |
|
|
|
|
} |
|
|
|
|
''; |
|
|
|
|
|
|
|
|
|
perl = writePerlBin "test_writers_perl_bin" { libraries = [ perlPackages.boolean ]; } '' |
|
|
|
|
perl = writePerlBin "test-writers-perl-bin" { libraries = [ perlPackages.boolean ]; } '' |
|
|
|
|
use boolean; |
|
|
|
|
print "success\n" if true; |
|
|
|
|
''; |
|
|
|
|
|
|
|
|
|
python2 = writePython2Bin "test_writers_python2_bin" { libraries = [ python2Packages.enum ]; } '' |
|
|
|
|
python2 = writePython2Bin "test-writers-python2-bin" { libraries = [ python2Packages.enum ]; } '' |
|
|
|
|
from enum import Enum |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -73,7 +73,7 @@ let |
|
|
|
|
print Test.a |
|
|
|
|
''; |
|
|
|
|
|
|
|
|
|
python3 = writePython3Bin "test_writers_python3_bin" { libraries = [ python3Packages.pyyaml ]; } '' |
|
|
|
|
python3 = writePython3Bin "test-writers-python3-bin" { libraries = [ python3Packages.pyyaml ]; } '' |
|
|
|
|
import yaml |
|
|
|
|
|
|
|
|
|
y = yaml.load(""" |
|
|
|
@ -84,11 +84,11 @@ let |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
simple = { |
|
|
|
|
bash = writeBash "test_writers_bash" '' |
|
|
|
|
bash = writeBash "test-writers-bash" '' |
|
|
|
|
if [[ "test" == "test" ]]; then echo "success"; fi |
|
|
|
|
''; |
|
|
|
|
|
|
|
|
|
c = writeC "test_writers_c" { libraries = [ glib.dev ]; } '' |
|
|
|
|
c = writeC "test-writers-c" { libraries = [ glib.dev ]; } '' |
|
|
|
|
#include <gio/gio.h> |
|
|
|
|
#include <stdio.h> |
|
|
|
|
int main() { |
|
|
|
@ -106,11 +106,11 @@ let |
|
|
|
|
} |
|
|
|
|
''; |
|
|
|
|
|
|
|
|
|
dash = writeDash "test_writers_dash" '' |
|
|
|
|
dash = writeDash "test-writers-dash" '' |
|
|
|
|
test '~' = '~' && echo 'success' |
|
|
|
|
''; |
|
|
|
|
|
|
|
|
|
haskell = writeHaskell "test_writers_haskell" { libraries = [ haskellPackages.acme-default ]; } '' |
|
|
|
|
haskell = writeHaskell "test-writers-haskell" { libraries = [ haskellPackages.acme-default ]; } '' |
|
|
|
|
import Data.Default |
|
|
|
|
|
|
|
|
|
int :: Int |
|
|
|
@ -122,7 +122,7 @@ let |
|
|
|
|
_ -> print "fail" |
|
|
|
|
''; |
|
|
|
|
|
|
|
|
|
js = writeJS "test_writers_js" { libraries = [ nodePackages.semver ]; } '' |
|
|
|
|
js = writeJS "test-writers-js" { libraries = [ nodePackages.semver ]; } '' |
|
|
|
|
var semver = require('semver'); |
|
|
|
|
|
|
|
|
|
if (semver.valid('1.2.3')) { |
|
|
|
@ -132,12 +132,12 @@ let |
|
|
|
|
} |
|
|
|
|
''; |
|
|
|
|
|
|
|
|
|
perl = writePerl "test_writers_perl" { libraries = [ perlPackages.boolean ]; } '' |
|
|
|
|
perl = writePerl "test-writers-perl" { libraries = [ perlPackages.boolean ]; } '' |
|
|
|
|
use boolean; |
|
|
|
|
print "success\n" if true; |
|
|
|
|
''; |
|
|
|
|
|
|
|
|
|
python2 = writePython2 "test_writers_python2" { libraries = [ python2Packages.enum ]; } '' |
|
|
|
|
python2 = writePython2 "test-writers-python2" { libraries = [ python2Packages.enum ]; } '' |
|
|
|
|
from enum import Enum |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -148,7 +148,7 @@ let |
|
|
|
|
print Test.a |
|
|
|
|
''; |
|
|
|
|
|
|
|
|
|
python3 = writePython3 "test_writers_python3" { libraries = [ python3Packages.pyyaml ]; } '' |
|
|
|
|
python3 = writePython3 "test-writers-python3" { libraries = [ python3Packages.pyyaml ]; } '' |
|
|
|
|
import yaml |
|
|
|
|
|
|
|
|
|
y = yaml.load(""" |
|
|
|
@ -157,21 +157,21 @@ let |
|
|
|
|
print(y[0]['test']) |
|
|
|
|
''; |
|
|
|
|
|
|
|
|
|
python2NoLibs = writePython2 "test_writers_python2_no_libs" {} '' |
|
|
|
|
python2NoLibs = writePython2 "test-writers-python2-no-libs" {} '' |
|
|
|
|
print("success") |
|
|
|
|
''; |
|
|
|
|
|
|
|
|
|
python3NoLibs = writePython3 "test_writers_python3_no_libs" {} '' |
|
|
|
|
python3NoLibs = writePython3 "test-writers-python3-no-libs" {} '' |
|
|
|
|
print("success") |
|
|
|
|
''; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
path = { |
|
|
|
|
bash = writeBash "test_writers_bash_path" (writeText "test" '' |
|
|
|
|
bash = writeBash "test-writers-bash-path" (writeText "test" '' |
|
|
|
|
if [[ "test" == "test" ]]; then echo "success"; fi |
|
|
|
|
''); |
|
|
|
|
haskell = writeHaskell "test_writers_haskell_path" { libraries = [ haskellPackages.acme-default ]; } (writeText "test" '' |
|
|
|
|
haskell = writeHaskell "test-writers-haskell-path" { libraries = [ haskellPackages.acme-default ]; } (writeText "test" '' |
|
|
|
|
import Data.Default |
|
|
|
|
|
|
|
|
|
int :: Int |
|
|
|
|